public void nextTurn(Napkin napkin, String s) { game.incrementActiveRow(); game.changeTurns(); napkin.changeNapkin(s); Invalidate(true); }
private void Form1_MouseMove(object sender, MouseEventArgs e) { timer1.Start(); if (game != null) { if (MouseButtons.Left == e.Button) { if (game.selectedFruit == null) { game.selectedFruit = game.doc.fruitIfHit(e.X, e.Y); try { Stream str = Properties.Resources.pop_sound; soundplayer = new SoundPlayer(str); soundplayer.Play(); } catch (Exception ex) { } } if (game.selectedFruit != null) { game.selectedFruit.MoveTo(e.X, e.Y); } } Napkin napkin = game.getNapkin(e.X, e.Y); if (napkin != null) { if (napkin.isCollision(e.X, e.Y)) { napkin.changeNapkin("hover"); } else { napkin.changeNapkin("00"); } } } //Invalidate(true); }