public void DisplayChips() { hardware.ClearScreen(); hardware.DrawImage(imgGoose); foreach (Chip ch in chipslist) { switch (ch.GetColor()) { case "red": hardware.DrawSprite(ch.GetImg(), (short)arrayBoxGoose[ch.GetPosChip()].xRed, (short)arrayBoxGoose[ch.GetPosChip()].yRed, 0, 0, 25, 25); break; case "blue": hardware.DrawSprite(ch.GetImg(), (short)arrayBoxGoose[ch.GetPosChip()].xBlue, (short)arrayBoxGoose[ch.GetPosChip()].yBlue, 0, 0, 25, 25); break; case "yellow": hardware.DrawSprite(ch.GetImg(), (short)arrayBoxGoose[ch.GetPosChip()].xYellow, (short)arrayBoxGoose[ch.GetPosChip()].yYellow, 0, 0, 25, 25); break; case "green": hardware.DrawSprite(ch.GetImg(), (short)arrayBoxGoose[ch.GetPosChip()].xGreen, (short)arrayBoxGoose[ch.GetPosChip()].yGreen, 0, 0, 25, 25); break; } } }
static void Main(string[] args) { LudoGoose game = new LudoGoose(); Hardware hardware = new Hardware(1152, 652, 24, false); WelcomeScreen welcome = new WelcomeScreen(hardware); MenuScreen menu = new MenuScreen(hardware); CreditsScreen credits = new CreditsScreen(hardware); LudoGame ludo = new LudoGame(hardware); PlayerSelect playerSelect = new PlayerSelect(hardware); RulesScreen rules = new RulesScreen(hardware); GooseController goose = new GooseController(hardware); do { hardware.ClearScreen(); welcome.Show(); if (!welcome.Exit()) { menu.Show(); switch (menu.GetChosenGame()) { case 1: ludo.PlayGame(menu.GetLang()); break; case 2: ludo.PlayLimitless(menu.GetLang()); break; case 3: ludo.PlayOnline(menu.GetLang()); break; case 4: ludo.PlayVsIA(menu.GetLang()); break; case 5: goose.Play(menu.GetLang()); break; case 6: credits.Show(menu.GetLang()); break; case 7: rules.Show(menu.GetLang()); break; } } } while (!welcome.Exit()); }
public void ShowWinner(string name, string lang) { hardware.ClearScreen(); IntPtr txtWinner; Sdl.SDL_Color yellow = new Sdl.SDL_Color(255, 255, 0); if (lang == "spanish") { txtWinner = SdlTtf.TTF_RenderText_Solid(font.GetFontType(), name + " HA GANADO LA PARTIDA!", yellow); } else { txtWinner = SdlTtf.TTF_RenderText_Solid(font.GetFontType(), name + " HAS WON THE GAME", yellow); } hardware.WriteText(txtWinner, 575, 300); hardware.UpdateScreen(); }