Skip to content

Bounce game using c#

cams sebilia

cams sebilia

Asked Sep 21, 2012, 5:02 PM EDT7 answers
Share
LinkedInX
can somebody help me with my case study? its about bounce game using c# language. i'm a student and this game is my requirement. i don't know how to start and to do it. and i'm desperate. i need to pass this semester. can u guys help me?  pls :'(

7 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    Well what do you have to do? Modify code, add code? Add code to pre-existing functions or what?
    0
  • cams sebilia
    0
    Good day! hmm Actually I need to revise my downloaded game. Last night I found the exact game that I need, all I have do to is to revise and to know every codes and its particular functions. Hm. can you pls help me? Sir or Ma'am? Hmmm :(((((
    0
  • 0
    Well anything you don't understand, post here.. We can help you with it then.
    0
  • cams sebilia
    0
    well, thank you so much sir, here's my work. 
    pls help me with the displaying of the scores? and at the same time, it stores? 
    0
  • 0
    Well give me something to work with, and we can help you.
    0
  • cams sebilia
    0
    sir how can I put the class score to the main program? 

    it goes like this:

    C#
    using System;
    using System.Drawing;
    using System.Drawing.Imaging;
    
    
    namespace AngryPig
    {
    public class Score
    {
    public int Count = 0;
    public Point Position = new Point(0,0);
    public Font MyFont = new Font("Chiller", 20.0f, GraphicsUnit.Pixel );
    
    
    public Score(int x, int y)
    {
    Position.X = x;
    Position.Y = y;
    }
    
    
    public void Draw(Graphics g)
    {
    g.DrawString(Count.ToString(), MyFont, Brushes.RoyalBlue, Position.X, Position.Y, new StringFormat());
    }
    
    
    public Rectangle GetFrame()
    {
    Rectangle myRect = new Rectangle(Position.X, Position.Y, (int)MyFont.SizeInPoints*Count.ToString().Length, MyFont.Height);
    return myRect;
    }
    
    
    
    
    
    
    
    
    public void Reset()
    {
    Count = 0;
    }
    
    
    public void Increment()
    {
    Count++;
    }
    }
    }

    that is the class score.

    and this:

    PowerShell
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Text;
    using System.Windows.Forms;
    
    
    namespace AngryPig
    {
        [BrowsableAttribute(true)]


    C#
        public partial class Form2 : Form
        {
            private Score count;
            public Form2()
            {
                InitializeComponent();
            }
    
    
            private void button1_Click(object sender, EventArgs e)
            {
                dataGridView1.Rows.Add(textBox1.Text);
                dataGridView1.Columns.Add(Count);
            }

           


    on dataGridView1.Columns.Add(Count)
    there is a proble,. i dont know what it is :(




    0
  • 0
    Well what error do you get, copy it here.
    0