Click here to Skip to main content
15,886,763 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
is any body here can help me on how to create a 'word factory game' I decided to create it on C# but will C# gives the best out of the game? can anyone provide some codes to start?

word factory game is somehow to be like scrabble game but the difference is in this game has a timer and it needs to shake the cube that has a letter on it then the player needs to make out words on that shaken cubes of letters, it's like a text twist game.

an image for word factory real game
http://gerilen.files.wordpress.com/2012/03/125.jpg[^]


if there's any software that is much easier than to c# to create this game what will it be? then how about for its database.

thanks for anyone who will answer this stupidity-like question. hahaha i'm really innocent for some things. XDD
Posted
Updated 28-Feb-13 6:38am
v2

1 solution

a roughly idea you can get from here..


C#
namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        const int GridHeight = 8;
        const int GridWidth = 8;
        string[,] GameGrid = new string[GridHeight, GridWidth];
        public Form1()
        {
            //need a text box and a button
            InitializeComponent();
            textBox1.Height = 200;
            textBox1.Width = 200;
            textBox1.Multiline = true;
        }




        private void button2_Click(object sender, EventArgs e)
        {

            ShuffleGrid();
            printGrid();
        }

        private void printGrid() {
            textBox1.Text = "";

            for (int ar1 = 0; ar1 < GridHeight; ar1++)
            {
                for (int ar2 = 0; ar2 < GridWidth; ar2++)
                {



                    textBox1.Text += GameGrid[ar1, ar2];

                }
                textBox1.Text += Environment.NewLine;

            }

        }
        private void ShuffleGrid() {
            textBox1.Text = "";
            Random r = new Random();
            for (int ar1 = 0; ar1 < GridHeight; ar1++)
            {
                for (int ar2 = 0; ar2 < GridWidth; ar2++)
                {
                    int i =r.Next(65, 93);
                    GameGrid[ar1, ar2] =  ((char)(i)).ToString();
                }
            }
        }

    }
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900