Přidat otázku mezi oblíbenéZasílat nové odpovědi e-mailemVyřešeno c# Switch - default - když není stisknuté tlačítko

• Had

namespace Had
{
    public enum Direction
    {
        Up,
        Down,
        Left,
        Right
    };

    public class Settings
    {
        public static int Width { get; set; }
        public static int Height { get; set; }
        public static int Speed { get; set; }
        public static int Score { get; set; }
        public static int Points { get; set; }
        public static bool GameOver { get; set; }
        public static Direction direction { get; set; }

        public Settings()
        {
            Width = 15;
            Height = 15;
            Speed = 15;
            Score = 0;
            Points = 100;
            GameOver = false;
            direction = Direction.Down;
        }
    }


}
• Input
using System.Collections;
using System.Windows.Forms;
namespace Had
{
    internal class Input
    {       
       private static Hashtable keyTable = new Hashtable();

        //verifikce zmacklého tlacitka
        public static bool KeyPressed(Keys key)
        {
            if (keyTable[key] == null)
            {
                return false;
            }

            return (bool) keyTable[key];
        }

        //Verifikace jestli je zmacklé
        public static void ChangeState(Keys key, bool state)
        {
            keyTable[key] = state;
        }
    }
}
:-p

Reakce na odpověď

1 Zadajte svou přezdívku:
2 Napište svou odpověď:
3 Pokud chcete dostat ban, zadejte libovolný text:

Zpět do poradny