Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
7f38def
updated with name
Brettj85 Jan 8, 2019
10ad562
added name
Brettj85 Jan 8, 2019
3a3555f
homework done
Brettj85 Jan 10, 2019
615cacd
practace 1 day 2 done
Brettj85 Jan 10, 2019
e6c2273
practace2 done
Brettj85 Jan 10, 2019
40921ed
starting the text based adventure
Brettj85 Jan 10, 2019
2e07782
up to spider
Brettj85 Jan 14, 2019
e77d929
up to spider
Brettj85 Jan 14, 2019
06caa32
committed
Brettj85 Jan 15, 2019
76f43bc
up to spec 6
Brettj85 Jan 15, 2019
9798f26
up to sentence
Brettj85 Jan 16, 2019
e405f91
finished structure of question and answer portion of the game success…
Brettj85 Jan 16, 2019
de77b73
continued to fight working
Brettj85 Jan 16, 2019
bb385cb
working and restarting game
Brettj85 Jan 16, 2019
28167af
built out deaths just have fight lest to build
Brettj85 Jan 16, 2019
ad0ccbd
completed and tested game
Brettj85 Jan 16, 2019
7e9aae0
cleaned up the console clears a bit
Brettj85 Jan 16, 2019
076bed8
cleaned upthe code a little ran out of time
Brettj85 Jan 16, 2019
bfd57ba
added file path parser
Brettj85 Jan 17, 2019
e82d6cb
completed Rock Paper Scissors
Brettj85 Jan 17, 2019
f47dfa7
added recursive ROCK PAPER SCISSOR from fiddle
Brettj85 Jan 19, 2019
89fa722
finishing sentence for piglatin
Brettj85 Jan 19, 2019
d937d14
finished up
Brettj85 Jan 19, 2019
1f64a70
completed
Brettj85 Jan 19, 2019
734e038
file path bonus completed
Brettj85 Jan 19, 2019
c0b7de3
finished fizzbuzz
Brettj85 Jan 23, 2019
e366f6b
finished fizzbuzz
Brettj85 Jan 25, 2019
fd34e25
finished fizzbuzz
Brettj85 Jan 26, 2019
424e0a7
finished shell
Brettj85 Jan 26, 2019
af8c405
looping through the array and finding the next smallest, have an issu…
Brettj85 Jan 26, 2019
e7f5616
Still cant get it to work but leaving coffee shop
Brettj85 Jan 26, 2019
0a09b39
tryed one more thing still not working it just returns 1 value over a…
Brettj85 Jan 26, 2019
4b0e0a0
changing stratagy need to see if c# can run functions simultaneously
Brettj85 Jan 26, 2019
d05a9d3
testing 'workers'
Brettj85 Jan 26, 2019
dea8ccf
successfuly went down rabbit hole, need to read more on objects, cons…
Brettj85 Jan 26, 2019
10c3fed
shell of multithread done may need 1 more thread
Brettj85 Jan 27, 2019
86e2b73
finished splitting the array into a larger # array and smaller (parti…
Brettj85 Jan 27, 2019
c898087
done for now
Brettj85 Jan 27, 2019
d92eb53
array is now split into 2 arrays 1 containing higher values and one l…
Brettj85 Jan 27, 2019
cb3a7a9
fixed a bug where it was inserting a 0 into the async array
Brettj85 Jan 27, 2019
26d5d1b
made an unfortunate assumption about how the sort will happenso thing…
Brettj85 Jan 27, 2019
026bac8
there is a more modern way of doing this
Brettj85 Jan 28, 2019
6aaf82c
closures may solve this issue i need to fix tie in ticTacToeand other…
Brettj85 Jan 28, 2019
130c707
Merge pull request #4 from Brettj85/RockPaperScissors
Brettj85 Jan 29, 2019
8c8ca7d
Merge pull request #5 from Brettj85/piglatin
Brettj85 Jan 29, 2019
9758150
Merge pull request #3 from Brettj85/textBasedGame
Brettj85 Jan 29, 2019
3f79bf0
Merge pull request #1 from Brettj85/helloBranch
Brettj85 Jan 29, 2019
3bd6a80
Merge pull request #2 from Brettj85/homework1
Brettj85 Jan 29, 2019
a024e45
spoke to my sr dev today about this and was advised to not do it this…
Brettj85 Jan 29, 2019
f259583
starting from scratch.....
Brettj85 Jan 29, 2019
dfa5d5d
have the basic gameplan
Brettj85 Jan 30, 2019
ae86364
basic structure
Brettj85 Jan 30, 2019
3d000d8
tired theres issues i can do a bubble sort in 10 min will try and com…
Brettj85 Jan 30, 2019
5e392bf
.
Brettj85 Jan 30, 2019
9ca7254
still super broken, still working on it
Brettj85 Jan 30, 2019
984ebe6
have 30 min left then need to write a simple sort for home work
Brettj85 Jan 30, 2019
2022ff3
have 30 min left then need to write a simple sort for home work
Brettj85 Jan 30, 2019
25296ba
dont know what i was doing there restarting it... yayy another one do…
Brettj85 Jan 30, 2019
b7b7e7b
structure doneish
Brettj85 Jan 30, 2019
1db1084
working
Brettj85 Jan 30, 2019
39e5148
Merge pull request #7 from Brettj85/sort
Brettj85 Feb 4, 2019
c4b21c4
almost done with checkers
Brettj85 Feb 26, 2019
8091add
almost done with checkers
Brettj85 Feb 26, 2019
9dec5fa
almost done with checkers base
Brettj85 Feb 26, 2019
1ef1583
base done prints checkers had an issue with console Encoding solved o…
Brettj85 Feb 26, 2019
cacb3e7
rudimentary checkers done
Brettj85 Feb 28, 2019
b2a16a5
base setup
Brettj85 Mar 2, 2019
41194d0
base setup
Brettj85 Mar 2, 2019
abfef1c
base setup
Brettj85 Mar 2, 2019
8cd423e
almost have the board setup
Brettj85 Mar 3, 2019
a8e94a3
worked on game logic a bit more still have no display
Brettj85 Mar 4, 2019
7363468
worked on game logic a bit more still have no display
Brettj85 Mar 4, 2019
c1804f9
fi8nished board
Brettj85 Mar 5, 2019
bb0af5a
fi8nished board
Brettj85 Mar 5, 2019
329981b
fi8nished board
Brettj85 Mar 5, 2019
2337d6f
finished for now have issues with being king or not
Brettj85 Mar 5, 2019
2d4debc
added king system
Brettj85 Mar 6, 2019
aea114a
0
Brettj85 Mar 6, 2019
5eb441f
0
Brettj85 Mar 6, 2019
124fb23
forcing me to commit nothing
Brettj85 Mar 8, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions CheckersCheckpoint/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/bin/Debug/netcoreapp2.2/CheckersCheckpoint.dll",
"args": [],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
"stopAtEntry": false,
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
}
]
}
15 changes: 15 additions & 0 deletions CheckersCheckpoint/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/CheckersCheckpoint.csproj"
],
"problemMatcher": "$msCompile"
}
]
}
111 changes: 111 additions & 0 deletions CheckersCheckpoint/Board.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
using System;
using System.Collections.Generic;
using System.Linq;

namespace CheckersCheckpoint
{
public class Board
{
public string[][] grid;
public List<Checker> checkers;

public Board()
{
this.Checkers = new List<Checker>();
this.CreateBoard();
return;
}
public string[][] Grid { get; set; }
public List<Checker> Checkers { get; set; }


public void CreateBoard()
{
this.Grid = new string[][]
{
new string[] {" ", " ", " ", " ", " ", " ", " ", " "},
new string[] {" ", " ", " ", " ", " ", " ", " ", " "},
new string[] {" ", " ", " ", " ", " ", " ", " ", " "},
new string[] {" ", " ", " ", " ", " ", " ", " ", " "},
new string[] {" ", " ", " ", " ", " ", " ", " ", " "},
new string[] {" ", " ", " ", " ", " ", " ", " ", " "},
new string[] {" ", " ", " ", " ", " ", " ", " ", " "},
new string[] {" ", " ", " ", " ", " ", " ", " ", " "},
};
return;
}


public void GenerateCheckers()
{
int[][] whitePositions = new int[][]
{
new int[] { 0, 1 }, new int[] { 0, 3 }, new int[] { 0, 5 }, new int[] { 0, 7 },
new int[] { 1, 0 }, new int[] { 1, 2 }, new int[] { 1, 4 }, new int[] { 1, 6 },
new int[] { 2, 1 }, new int [] { 2, 3 }, new int[] { 2, 5 }, new int[] { 2, 7}
};

int[][] blackPositions = new int[][]
{
new int[] { 5, 0 }, new int[] { 5, 2 }, new int[] { 5, 4 }, new int[] { 5, 6 },
new int[] { 6, 1 }, new int[] { 6, 3 }, new int[] { 6, 5 }, new int[] { 6, 7 },
new int[] { 7, 0 }, new int[] { 7, 2 }, new int [] { 7, 4 }, new int[] { 7, 6 }
};

for (int i = 0; i < 12; i++)

{
Checker white = new Checker("white", whitePositions[i]);
Checker black = new Checker("black", blackPositions[i]);
Checkers.Add(white);
Checkers.Add(black);
}
return;
}



public void PlaceCheckers()
{
foreach (var checker in Checkers)
{
;
this.Grid[checker.Position[0]][checker.Position[1]] = checker.Symbol;
}
return;
}


public void DrawBoard()
{
CreateBoard();
PlaceCheckers();
Console.WriteLine(" 0 1 2 3 4 5 6 7 ");
Console.OutputEncoding = System.Text.Encoding.UTF8;
for (int i = 0; i < 8; i++)
{
Console.WriteLine(i + " " + String.Join(" ", this.Grid[i]));
}
return;
}


public Checker SelectChecker(int row, int column)
{
return Checkers.Find(x => x.Position.SequenceEqual(new List<int> { row, column }));
}


public void RemoveChecker(Checker checker)
{
Checkers.Remove(checker);
return;
}


public bool CheckForWin()
{
return Checkers.All(x => x.Color == "white") || !Checkers.Exists(x => x.Color == "white");
}
}
}
50 changes: 50 additions & 0 deletions CheckersCheckpoint/Checker.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
using System;
using System.Collections.Generic;
using System.Linq;

namespace CheckersCheckpoint
{
public class Checker
{
public string symbol;
public int[] position;
public string color;


public Checker(string color, int[] position)
{
int circleId;

if (color == "white")
{
circleId = int.Parse("25CE", System.Globalization.NumberStyles.HexNumber);
Color = "white";
}
else
{
circleId = int.Parse("25C9", System.Globalization.NumberStyles.HexNumber);
Color = "black";
}
this.Symbol = char.ConvertFromUtf32(circleId);
this.Position = position;
}

public string Symbol
{
get;
set;
}

public int[] Position
{
get;
set;
}

public string Color
{
get;
set;
}
}
}
8 changes: 8 additions & 0 deletions CheckersCheckpoint/CheckersCheckpoint.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.2</TargetFramework>
</PropertyGroup>

</Project>
71 changes: 71 additions & 0 deletions CheckersCheckpoint/Game.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
using System;
using System.Collections.Generic;
using System.Linq;

namespace CheckersCheckpoint
{
public class Game
{
public Game()
{
Board board = new Board();
board.GenerateCheckers();
board.DrawBoard();

Console.WriteLine("\nIf you want to move a checker one space diagonally forward, enter 'move'.");
Console.WriteLine("\nIf a jump is available for one of your checker, you must enter 'jump'.");

string choice = Console.ReadLine();

do
{
switch (choice)
{
case "move":

Console.WriteLine("Enter checker Row to move:");
int row = int.Parse(Console.ReadLine());
Console.WriteLine("Enter checker Column:");
int column = int.Parse(Console.ReadLine());

if (board.SelectChecker(row, column) != null)
{
Checker checker = board.SelectChecker(row, column);
Console.WriteLine("Move to which Row: ");
int newRow = int.Parse(Console.ReadLine());
Console.WriteLine("Move to which Column: ");
int newColumn = int.Parse(Console.ReadLine());
checker.Position = new int[] { newRow, newColumn };
board.DrawBoard();
}
else
{
Console.WriteLine("Invalid input");
Console.WriteLine("Enter a valid checker Row:");
row = int.Parse(Console.ReadLine());
Console.WriteLine("Enter a valid checker Column:");
column = int.Parse(Console.ReadLine());
}
break;

case "jump":

Console.WriteLine("Select checker Row to remove:");
int removeRow = int.Parse(Console.ReadLine());
Console.WriteLine("Select checker Column to remove:");
int removeColumn = int.Parse(Console.ReadLine());
Checker changeChecker = board.SelectChecker(removeRow, removeColumn);
board.RemoveChecker(changeChecker);
board.DrawBoard();
break;

default:

Console.WriteLine("Invalid input.");
break;
}
}
while (board.CheckForWin() != true);
}
}
}
15 changes: 15 additions & 0 deletions CheckersCheckpoint/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;

namespace CheckersCheckpoint
{
public class Program
{
public static void Main(string[] args)
{
new Game();
}

}
}
16 changes: 16 additions & 0 deletions CheckersCheckpoint/bash.exe.stackdump
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Stack trace:
Frame Function Args
00180328AF0 0018006021E (00180247D00, 001802340B9, 00000000058, 000FFFFB740)
00180328AF0 00180048859 (00180236765, 00100000000, 00000000000, 00000000001)
00180328AF0 00180048892 (00000000000, 00000000000, 00000000058, 00180328950)
00180328AF0 0018006C179 (0000000000A, 00000000000, 0000000000A, 00000000000)
00180328AF0 0018006C342 (00000000003, 00000000000, 00180044EEF, 000FFFFCB30)
00000000000 0018006D3A8 (0000000000D, 000FFFFC920, 001800E4CF6, 000FFFFC920)
00000000000 00180058816 (000FFFF0000, 00000000000, 00000000000, 006FFFFFFFF)
00000000000 001800590A9 (000FFFFCAF0, 00600040000, 00000000000, 000FFFFCB80)
00180325CF8 001800595BA (001800C0322, 00000000000, 00000000000, 00000000000)
000FFFFCCD0 00180059937 (000FFFFCDF0, 000FFFFCCD0, FFFFFFFFFFFFFFD1, 00000000000)
000FFFFCCD0 00180048FE1 (00000000000, 00000000000, 00000000000, 00000000000)
00000000000 00180047963 (00000000000, 00000000000, 00000000000, 00000000000)
000FFFFFFF0 00180047A14 (00000000000, 00000000000, 00000000000, 00000000000)
End of stack trace
21 changes: 20 additions & 1 deletion FizzBuzz/FizzBuzz.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,31 @@
using System;
using System.Linq;
using System.Collections.Generic;

namespace FizzBuzz
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
for (int i = 1; i < 100; i++)
{
if (i % 3 == 0)
{
Console.Write("FIZZ");
}
if (i % 5 == 0)
{
Console.Write("BUZZ");
}
if (i % 3 != 0 && i % 5 != 0)
{
Console.Write(i);
}
Console.Write("\n");
}
// Enumerable.Range(1, 100).Select(n => new Dictionary<int, string>
// { {15, "FizzBuzz"}, {3, "Fizz"}, {5, "Buzz"}, {1, n.ToString()} }.First(kv => n % kv.Key == 0).Value).ToList().ForEach(Console.WriteLine);
}
}
}
26 changes: 26 additions & 0 deletions HelloWorld/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/bin/Debug/netcoreapp2.0/HelloWorld.dll",
"args": [],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
"stopAtEntry": false,
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
}
]
}
Loading