Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8094989
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T20:58:30+00:00 2026-06-05T20:58:30+00:00

I am trying to make a Chess multiplayer game in Visual Basic. Its a

  • 0

I am trying to make a Chess multiplayer game in Visual Basic. Its a two player which will be played in a normal way and not even over LAN.
So far, I am done designing the board.

My logic is:
First, on clicking any square, the click event handler will check whether a piece resides on that square. If not, then it checks if a piece is to be moved to that square. If both are negative, then it does nothing.

Now, the problem with this is, how do I code the click events? Also, I have represented the board using a 2dimensional array. But how do I update the positions after every move? And how do I check whether legal move is being executed? One more thing I want to add is whenever a piece is clicked, the possible legal squares should be highlighted.

For this, what I did was, for every click event on any square it checked if there was a piece. If there was a piece, then it highlighted all possible moves for that piece using If-Else-If logic, but it turned out to be too cumbersome and too long. And another problem which arose was, how do I know that if the user clicks an empty square to move the piece there?

Please help me.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T20:58:33+00:00Added an answer on June 5, 2026 at 8:58 pm

    “But how do I update the positions after every move?”

    When the piece is about to be moved:

    Check if the piece can move like that. (Like bishop can only move diagonally)

    Check that your teams piece is not on the position your about to move.

    Make a second array where the move is already happened.

    Check if the move was legal. (Its your turn but the your king is kill-able with one move)

    To check this you need:

    To get your kings position

    And then look up all the possible moves for the opponent

    check if a move can land on your kings position.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

trying to make a page which will recursively call a function until a limit
I am trying to make a chess game. So I am placing the board,coins
I'm trying make a static text which if too long for the sizer, will
My problem is I'm trying to make a console based chess game. Starting off
Im trying to make a quite simple game but its having an error. I
Trying to make simple minesweeper game in python, but have one problem. I have
I am trying make such application which speak automatically when the image loaded it
I am trying to make a simple item database using MySQL for a game.
I'm trying make this code which is from a Dictionary of Arrays (CODE) from
Right now I'm trying make some browser based game. But I have little questions.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.