User Profile

Collapse

Profile Sidebar

Collapse
yves de Munck
yves de Munck
Last Activity: Dec 15 '11, 11:04 AM
Joined: Mar 14 '11
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • yves de Munck
    started a topic Does anyone see the mistake in this code ?

    Does anyone see the mistake in this code ?

    Hello there !

    I'm writing four in a row in csharp.
    It's almost done, the only problem is the control for when there actually is four in a row.

    I have vertical and horizontal working perfectly fine, diagonal from down-left to right up should work to.
    Only if i put in the code i found for left-up to downright, sometimes i get a random message that a player won.
    Does anyone see the mistake ?
    ...
    See more | Go to post

  • Thank you for your respond !
    I found the answer.

    I had to declare the 2 players at the top like this
    Code:
     public partial class frmVieropeenrij : Form
        {
            byte NieuwSpel;
            Spel GestartSpel = new Spel();
            Graphics spelbord;
    
            private Speler Speler1;
            private Speler Speler2;
    
    // rest of code
    and then i made my functions like...
    See more | Go to post

    Leave a comment:


  • Is there a way to use a variable from a function in the whole form ?

    I'm making the game four on a row (with oop)
    On the form the player has to indicate if he is playing against a Person or to the computer.
    (this is done bij indicating the right radiobutton)

    Then in the code it will controle this with an if(...)
    Code:
    if (rdbSpeler.Checked == true)
      { SpelTegenSpeler(); 
      rdbCpu.Visible = false;}
    else
    { SpelTegenSpeler(); rdbSpeler.Visible = false;  }
    ...
    See more | Go to post

  • yves de Munck
    started a topic Using MouseEnter on picturebox

    Using MouseEnter on picturebox

    Im quite new at csharp and im trying to use the onmouseenter event but i can't get it to work.

    i used;
    Code:
    private void picDraw_MouseEnter(object sender, EventArgs e)
    {
    the action
    }
    
    private void picDraw_OnMouseEnter(object sender, EventArgs e)
    {
    the action
    }
    See more | Go to post
No activity results to display
Show More
Working...