bialasik__
❔ I am trying to make a simple game in C# console.
Problem: Whenever the player character goes out of bounds/ touches the border, I get an exception. I want the player to bounce back/ stop at the border. I was thinking of resetting velocity, but this doesnt seem to work.
3 replies
❔ Linux Mint .NET is installed but cmds such as run, new console, etc. are not recognised...
I am thinking of switching to Linux but cannot get .NET SDK and runtime installed correctly for some reason, even when following the official Microsoft documentation. They only provided instructions for Ubuntu and other distributions, but not Mint, however I read that Mint is based on Ubuntu so I don't see why this should not work. Any help would be appreciated! 🙂
6 replies
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 = ' ';
}
12 replies