| |

VerySource

 Forgot password?
 Register
Search
View: 984|Reply: 3

Backgammon problem

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-1-2 19:20:01
| Show all posts |Read mode
My chessboard is a set of Button [] [] stored in a two-dimensional array
How to realize the algorithm to determine whether there are five pieces on a line?
Reply

Use magic Report

0

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-7-22 00:30:01
| Show all posts
Computer graphics Yes Line algorithm
Reply

Use magic Report

1

Threads

7

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-7-23 18:30:01
| Show all posts
b[0][0] b[0][1] ... b[0][4]

b[1][0] b[2][0]...b[5][0]

b[1][1] b[2][2] b[3][3]...
Reply

Use magic Report

1

Threads

4

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-7-29 10:45:01
| Show all posts
Every time a piece is played, judge the front, back, left, and right of the piece
For example, if you are down at position i, j, then judge the up, down, left, and right diagonals of i, j coordinates, and you can iteratively judge whether there is a chess piece at the next position. As long as the judgment is made every time.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list