TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Karim
NA
15
1.7k
Making a tetris clone, what to do about the grid?
Mar 11 2013 5:58 PM
I want to make a tetris clone as a personal project. I am using a windows form app. My picturebox is 250 x 500 pixels, making each square 25px x 25px. I have already made my tetris pieces using photoshop, and they are in .png format.
Now, the main reason I am posting this is to get an idea of how the game grid works. I know that its going to be a 2D array. What I have so far...
namespace tetris
{
public class GameGrid : PictureBox
{
//multidimensional array because we have a grid
private int[,] grid{get; set;}
private int x;
private int y;
public GameGrid()
{
grid = new int[10,20];//our grid is 10 x 20
}
}
Basically, do I inherit the PictureBox properties or not? since I want to model the grid as a 2D array.
Reply
Answers (
0
)
would anyone help?
Gridview Dynamic Header