using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Content; namespace TetrisPrac { class TetrisBlock : TetrisBlocks //Manier om gemakkelijk 't grid over te erven? { Texture2D block; Vector2 position; Vector2[,] gridPosition; public TetrisBlock() { } public void GridPositions() { Vector2[,] gridPosition = new Vector2[13, 20]; //geeft een array van 13 bij 20, elke cel bevat een vector voor de positie in schermcoordinaten for (int x = 0; x < 13; x++) { for (int y = 0; y < 20; y++) { gridPosition[x, y] = new Vector2(block.Width * x, block.Height * y) + TetrisGrid.screenPosition; //gridBlock is de sprite voor 't grid, block is de sprite voor 't standaardblokje } } } /*public bool overlapsWith(TetrisBlock b) { for (int i = 0; i < 4; i++) for (int j = 0; j < 4; j++) if (b.configuration[i, j] && configuration[i, j]) return true; return false; } */ } }