private static Paintball ParsePaintball(string[] mapObject) { float locationX = float.Parse(mapObject[1]); float locationY = float.Parse(mapObject[2]); Paintball paintball = new Paintball(new PointF(locationX, locationY)); return(paintball); }
// END CUT HERE // BEGIN CUT HERE public static void Main() { Paintball ___test = new Paintball(); ___test.run_test(-1); try { } catch(Exception e) { //Console.WriteLine(e.StackTrace); Console.WriteLine(e.ToString()); } }
// END CUT HERE // BEGIN CUT HERE public static void Main() { Paintball ___test = new Paintball(); ___test.run_test(-1); try { } catch (Exception e) { //Console.WriteLine(e.StackTrace); Console.WriteLine(e.ToString()); } }
public void CreatePaintball() { PointF location = new PointF(100, 100); PointF velocity = new PointF(15, 5); _paintball = new Paintball(location, velocity); Assert.AreEqual(_paintball.Location.X, 100); Assert.AreEqual(_paintball.Location.Y, 100); Assert.AreEqual(_paintball.Velocity.X, 15); Assert.AreEqual(_paintball.Velocity.Y, 5); }
public void RenderPaintballTest() { Paintball paintball = new Paintball(new PointF(100, 100)); Bitmap actualImage = new Bitmap(800, 600); Graphics actualGraphics = Graphics.FromImage(actualImage); actualGraphics.Clear(Color.Black); paintball.Render(actualGraphics); actualImage.Save("../../RenderingActual/paintball.bmp"); Bitmap expectedImage = (Bitmap)Bitmap.FromFile("../../RenderingExpected/paintball.bmp"); VerifyPictureIsTheSame(expectedImage, actualImage); actualImage.Dispose(); expectedImage.Dispose(); }
public Game() { thePoint = new Point(50, 50); gun = new Paintball(thePoint); }