Bejeweled - Setting up graphical array (game board)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include<iostream>
#include<string>
#include <time.h>
#include <cstdlib>
using namespace std;


	
// Will assign gems to have integer values  for ease
int main()
{

const int triangle = 0;
const int square = 1;
const int diamond = 2;
const int circle = 3;
const int star = 4;
srand(time(NULL)); 


int board[8][8]; // This is an array to hold the information in each square on the board
int i,j;

for (i=0; i<8; i++) 
{
	
	for (j=0; j<8; j++)
	{
	board[i][j] = rand()%5;
	}	 
}

cout << board[0][0] << " " << board[7][7] << endl;

return 0;
}


Hi guys. I'm currently using quincy 2005. I have been told to use FLK for a graphics package?
This is currently an array filled with random numbers. The object is to make a game that resembles bejeweled. I am struggling with how to transfer this array, to game-like graphical array on screen to the user.
If anyone can shed some light, would appreciate.
I think you must use a graphics library.

For games and the like, use SDL.
http://www.libsdl.org/
Get started here:
http://lazyfoo.net/SDL_tutorials/
Hi there. Apparently I must use the FLTK graphics library? Are you familiar with this? Are the above you listed better?

Thanks
I have not had a look at them.
I got the info from this post: http://www.cplusplus.com/forum/beginner/11131/#msg52601
which I think can be trusted.
Topic archived. No new replies allowed.