Overview
| SHA1 Hash: | c8adca5c9b60a84f4da0b89391587f651a64b37f |
|---|---|
| Date: | 2011-11-19 03:23:37 |
| User: | crc |
| Comment: | use whend in tic-tac-toe game |
| Timelines: | family | ancestors | descendants | both | trunk |
| Other Links: | files | manifest |
Tags And Properties
- branch=trunk inherited from [dc67bca1f3]
- sym-trunk inherited from [dc67bca1f3]
Changes
[hide diffs]
[patch]Modified games/tic-tac-toe.rx from [ea4dcd451fd68a5a] to [f7609f4e5392d0dc].
@@ -16,19 +16,19 @@ : middle ( n- ) 55 40 40 player solid box ; : bottom ( n- ) 105 40 40 player solid box ; : column ( nn- ) swap - [ 0 50 within ] [ drop top ] when - [ 50 100 within ] [ drop middle ] when - [ 100 150 within ] [ drop bottom ] when + [ 0 50 within ] [ top ] whend + [ 50 100 within ] [ middle ] whend + [ 100 150 within ] [ bottom ] whend 2drop ; : row ( nn- ) - [ 0 50 within ] [ drop 5 column ] when - [ 50 100 within ] [ drop 55 column ] when - [ 100 150 within ] [ drop 105 column ] when + [ 0 50 within ] [ 5 column ] whend + [ 50 100 within ] [ 55 column ] whend + [ 100 150 within ] [ 105 column ] whend 2drop ; : moved? ( nn-nnf ) 2over @mx = [ @my = ] dip and [ 2over [ !my ] [ !mx ] bi* ] dip ;