AcChess

murray83

Games Collector
Local time
Today, 17:01
Joined
Mar 31, 2017
Messages
798
Thanks to the ideas of fellow member @MajP having cracked the scrabble idea ( top marks to your demo sir ) i had another idea for movement but this time I think the coordinate idea works well all though I'm sure you could drop in Majp's drop and drag idea. but for now it is just a simple two box from and to

see what you think
 

Attachments

Last edited:
made some updates ( had the time as snow and sick bug so not going out today )

moves are captured and shown on form in a text box n the form, made it a bit more nice looking but still got an issue to fix

to do

logic for moves from a1 to h1 ( apart from the knight )
check and check mate

ps could this maybe be moved to sample db forum section
 

Attachments

Last edited:
You do not have to do the drag and drop, but it would not be hard to implement. However, I would consider using a doublick click or click event. Typing the grid is a little too much work.

1. Click/double click a square with a piece.
2. Highlight somehow the selected piece (maybe a yellow border)
3. If a piece is selected, then double click on an empty square
4. Validate the move or provide message
5. Move piece
6. Remove highlight.
 
actually you need more tha just visual design on that.
you need the actual code/ai if you are going to have a match against the computer.
 
looked into the click and move and didn't work as i would of liked so for my aesthetic gonna stick with the enter ( prob old skool but hey it works )

have added a highlight though ( which for now i have kept ) and as for ai was going to just have p v p for now

edit sorry forgot to say thanks for ideas and looking :)
 

Attachments

had a bit of more done to it, check is working but at mo just pawns and then i have gone and broke the diagonal take of the pawns :( perhaps some one can see what i have done wrong
 

Attachments

You can get rid of about 450 lines of code and 128 event procedures.

Make a function.
Code:
Public Function fnHighlightTextBox()
  HighlightTextBox Me.ActiveControl
End Function
1. Remove all board tile click event procedures
2. Select all squares and set the onclick: =fnHighLightTextBox()
3. Remove all the square mouse down. Select all squares and set locked = true.
 
You can get rid of about 450 lines of code and 128 event procedures.

Make a function.
Code:
Public Function fnHighlightTextBox()
  HighlightTextBox Me.ActiveControl
End Function
1. Remove all board tile click event procedures
2. Select all squares and set the onclick: =fnHighLightTextBox()
3. Remove all the square mouse down. Select all squares and set locked = true.
i did the highlight one but the lock. think in the past locking the text box has present a problem but will look into that as well, cheers

edit 21:58 UK

i did lock and works still ? not sure why i had that in, maybe when i was looking at drag and drop
 
Last edited:

Users who are viewing this thread

Back
Top Bottom