Example #1
0
	public void SwapLetters()
	{
		Model model = new Model();
		model.Start();
		Assert.AreEqual(false,
			model.SwapLetters(new int[]{-1, -1}));
		Assert.AreEqual(false,
			model.SwapLetters(new int[]{-1, 0}));
		Assert.AreEqual(false,
			model.SwapLetters(new int[]{3, 1}));
		model.tileSelecteds[1] = true;
		model.tileSelecteds[3] = true;
		Assert.AreEqual(false,
			model.SwapLetters(new int[]{0, 0}));
		Assert.AreEqual(true,
			model.SwapLetters(new int[]{3, 1}));
		Assert.AreEqual(false,
			model.SwapLetters(new int[]{1, 2}));
		Assert.AreEqual(true,
			model.SwapLetters(new int[]{1, 3}));
		Assert.AreEqual(true,
			model.SwapLetters(new int[]{1, 3}));
	}
 public void Init( Microsoft.Xna.Framework.Game game )
 {
     _model = new Model( (Game1) game );
     _model.Load( GameStatePlayMenu.MapToPlay );
     _model.Start();
 }