public static variable not changing
if (choice == 'H' && coinFlip == 1 ||
choice == 'T' && coinFlip == 2)
{
playerPawn = 'O'; // one instance where i want to change this variable
PlayerTurn();
ValuesCheck();
}
else
{
playerPawn = 'X';
ComputerTurn();
ValuesCheck();
}
##############################################################
public static class Globals
{
public static char[,] values = {
{ ' ', ' ', ' ' },
{ ' ', ' ', ' ' },
{ ' ', ' ', ' ' } }; // this changes fine in the exact same class the other variable is
but playerPawn does not
public static char playerPawn = ' ';
}
choice == 'T' && coinFlip == 2)
{
playerPawn = 'O'; // one instance where i want to change this variable
PlayerTurn();
ValuesCheck();
}
else
{
playerPawn = 'X';
ComputerTurn();
ValuesCheck();
}
##############################################################
public static class Globals
{
public static char[,] values = {
{ ' ', ' ', ' ' },
{ ' ', ' ', ' ' },
{ ' ', ' ', ' ' } }; // this changes fine in the exact same class the other variable is
but playerPawn does not
public static char playerPawn = ' ';
}