static void Main(string[] args) { Durango d = new Durango(); d.Boxer(); playerInfo playerOne = new playerInfo(); playerInfo playerTwo = new playerInfo(); char[,] board = new char[9, 10]; int dropChoice, win, full, again; Console.WriteLine("Let's Play Connect 4"); Console.WriteLine("Player One please enter your name: "); playerOne.playerName = Console.ReadLine(); playerOne.playerID = 'X'; Console.WriteLine("Player Two please enter your name: "); playerTwo.playerName = Console.ReadLine(); playerTwo.playerID = 'O'; full = 0; win = 0; again = 0; DisplayBoard(board); do { dropChoice = PlayerDrop(board, playerOne); CheckBellow(board, playerOne, dropChoice); DisplayBoard(board); win = CheckFour(board, playerOne); if (win == 1) { PlayerWin(playerOne); again = restart(board); if (again == 2) { break; } } dropChoice = PlayerDrop(board, playerTwo); CheckBellow(board, playerTwo, dropChoice); DisplayBoard(board); win = CheckFour(board, playerTwo); if (win == 1) { PlayerWin(playerTwo); again = restart(board); if (again == 2) { break; } } full = FullBoard(board); if (full == 7) { Console.WriteLine("The board is full, it is a draw!"); again = restart(board); } } while (again != 2); }
public static void Special() { int sum; int total2; Durango dur = new Durango(); dur.Boxer(); total2 = dur.preformAddition(20, 200); Console.WriteLine(total2); }
static void Main() { // 1 - add a new project file // 1.1 - create/add a reference to Antidote project in references Console.WriteLine("Getting ready to take on the world...again"); // 4 - created an instance of the durango class from the Antidote project // 5 - then called a method from that class Durango d = new Durango(); //this class must b public in its project or will not be seen!!! d.Boxer(); Business b = new Business(); //this class must b public in its project or will not be seen!!! //6 - make this the starting project // 7 - This will not work both ways...this is an example of information hiding!!!! int tot = d.PerformAdding(2, 4); Console.WriteLine(tot); Console.ReadLine(); }