|
Here's a quick look at the interface for a code-only C$ game.
1) There must be some method to tell you code if it's going first or second.
2) When it's your turn, calculate a move, then send an IR message which
indicates the column number (1-7) of the move.
3) Wait for a confirmation message (this step allows for better UI on the RCX)
4) Wait for opponent move (via IR, 1-7)
5) When IR signal is received, send confirmation message (send "move" back)
6) If you're not done, goto (2)
I have a PC interface that I will post, ASAP. It uses the IR tower to watch
games and display the board on the screen. It also shows times, and move
history.
If anyone wants to display their code, feel free to send it to me (or send a
link)
The code should:
A) Run on standard firmware (ha)
OR
B) Include the firmware and other files needed for download.
One other question that you (the coder) may want to answer: Does your program do
anything random, or will it play the exact same game (given the same input)
every time. (people may want to test it more than once, if it DOES include
something random)
Questions?
Steve
|
|
Message has 4 Replies: | | Re: C$ - Code Only
|
| (...) I can see a few soloutions: 1 on board UI. run prg slot 1 or 2 depending on who goes first. for OTHER os's then you can have an ON BOARD UI, press view, or prg. to start. 2. beam a "message" to each brick. 1 or 2. 3. put a touch sensor on each (...) (21 years ago, 2-Feb-04, to lugnet.org.ca.rtltoronto)
| | | Re: C$ - Code Only
|
| (...) Yeah, is there a crash course page on sending standard IR messages from brickOS? Anyways, I've posted my logic. It takes about 6-7 seconds to make the decisions on a brick (with the sensor polling decreased -- see an old robotics.rcx.legos (...) (21 years ago, 3-Feb-04, to lugnet.org.ca.rtltoronto)
| | | Re: C$ - Code Only
|
| (...) Steve, First things first, I have one program for player 0, and a second program for player 1. I cannot play both games with the same program. I'm sure you'll figure out why. There is no real need for steps 3 or 5 (steps 4 and 6 provide the (...) (21 years ago, 5-Feb-04, to lugnet.org.ca.rtltoronto)
|
28 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|