using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; class TetrisGame : Game // idee: upgrades om op te pakken d.m.v. het verwijderen van de omvattende rij, zoals bijvb. een metal blok die de vallende blokken 1 de normale blokken laat indeuken upon impact, ze vallen ook sneller en zolang die upgrade werkt, ook speelt 't tetris metal melodietje {//tevens maken we binnen de gamewolrd classe een block classe aan met subclassen voor de upgrades SpriteBatch spriteBatch; InputHelper inputHelper; GameWorld gameWorld; static void Main(string[] args) { TetrisGame game = new TetrisGame(); game.Run(); } public TetrisGame() { // initialize the graphics device GraphicsDeviceManager graphics = new GraphicsDeviceManager(this); // set the directory where game assets are located this.Content.RootDirectory = "Content"; // set the desired window size graphics.PreferredBackBufferWidth = 800; graphics.PreferredBackBufferHeight = 600; // create the input helper object inputHelper = new InputHelper(); } protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); // create and reset the game world gameWorld = new GameWorld(GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height, Content); gameWorld.Reset(); } protected override void Update(GameTime gameTime) { inputHelper.Update(gameTime); gameWorld.HandleInput(gameTime, inputHelper); gameWorld.Update(gameTime); } protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.White); gameWorld.Draw(gameTime, spriteBatch); object[,] grid; } }