home *** CD-ROM | disk | FTP | other *** search
- Path: uunet!zephyr.ens.tek.com!master!saab!billr
- From: billr@saab.CNA.TEK.COM (Bill Randle)
- Newsgroups: comp.sources.games
- Subject: v15i009: scrabble2 - another version of the crossword-puzzle board game, Patch1
- Message-ID: <3813@master.CNA.TEK.COM>
- Date: 26 Oct 92 16:26:33 GMT
- Sender: news@master.CNA.TEK.COM
- Lines: 860
- Approved: billr@saab.CNA.TEK.COM
- Xref: uunet comp.sources.games:1508
-
- Submitted-by: jac@doe.carleton.ca (James A. Cherry)
- Posting-number: Volume 15, Issue 9
- Archive-name: scrabble2/Patch1
- Patch-To: scrabble2: Volume 14, Issue 92-111
- Environment: curses
-
- [From the author...]
- [[Here are a set of updates for scrabble V1.21 to V1.30
- A list of people who suggested changes to scrabble, followed by my
- responses to them is in the CHANGES file.]]
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of shell archive."
- # Contents: patches01
- # Wrapped by billr@saab on Mon Oct 26 08:23:27 1992
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'patches01' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'patches01'\"
- else
- echo shar: Extracting \"'patches01'\" \(22997 characters\)
- sed "s/^X//" >'patches01' <<'END_OF_FILE'
- X*** cmove.c.orig Sun Jul 26 11:20:23 1992
- X--- cmove.c Mon Oct 26 08:17:37 1992
- X***************
- X*** 231,237 ****
- X--- 231,241 ----
- X tile++;
- X if( blank > oldbl && tile > 0 ) {
- X oldbl = blank;
- X+ #ifdef DBLSIZE_BOARD
- X+ move( BOARD_UY + sy - 1, BOARD_LX + sx * 2 - 2 );
- X+ #else
- X move( BOARD_UY + sy - 1, BOARD_LX + sx - 1 );
- X+ #endif
- X refresh();
- X try_tiles( sx, sy, blank, dir );
- X }
- X*** misc.c.orig Tue Sep 22 11:21:51 1992
- X--- misc.c Mon Oct 26 08:17:38 1992
- X***************
- X*** 61,68 ****
- X }
- X }
- X if( rlen > tlen ) {
- X tlen = rlen;
- X- wlen[tlen] = wr;
- X }
- X strcpy( &words[pt], inp );
- X wptr[wr++] = pt;
- X--- 61,68 ----
- X }
- X }
- X if( rlen > tlen ) {
- X+ for( i = tlen + 1; i <= rlen; i++ ) wlen[i] = wr;
- X tlen = rlen;
- X }
- X strcpy( &words[pt], inp );
- X wptr[wr++] = pt;
- X***************
- X*** 69,76 ****
- X pt += rlen + 1;
- X strcpy( tinp, inp );
- X }
- X dict_size = pt;
- X! wlen[16] = wr;
- X fclose( fp );
- X }
- X
- X--- 69,78 ----
- X pt += rlen + 1;
- X strcpy( tinp, inp );
- X }
- X+ words[pt] = '\0';
- X+ wptr[wr] = pt;
- X dict_size = pt;
- X! for( i = tlen + 1; i < 17; i++ ) wlen[i] = wr;
- X fclose( fp );
- X }
- X
- X***************
- X*** 111,119 ****
- X print_board() {
- X int i, j;
- X
- X for( i = 1; i < 16; i++ ) {
- X- move( BOARD_UY + i - 1, BOARD_LX );
- X for( j = 1; j < 16; j++ ) {
- X if( board[i][j] >= 'A' ) standout();
- X if( ( i == b1y && j == b1x ) || ( i == b2y && j == b2x ) )
- X addch( board[i][j] - 'A' + 'a' );
- X--- 113,126 ----
- X print_board() {
- X int i, j;
- X
- X+ clear_rect( BOARD_UY, BOARD_LX, BOARD_LY, BOARD_RX );
- X for( i = 1; i < 16; i++ ) {
- X for( j = 1; j < 16; j++ ) {
- X+ #ifdef DBLSIZE_BOARD
- X+ move( BOARD_UY + i - 1, BOARD_LX + j * 2 - 2 );
- X+ #else
- X+ move( BOARD_UY + i - 1, BOARD_LX + j - 1 );
- X+ #endif
- X if( board[i][j] >= 'A' ) standout();
- X if( ( i == b1y && j == b1x ) || ( i == b2y && j == b2x ) )
- X addch( board[i][j] - 'A' + 'a' );
- X***************
- X*** 129,143 ****
- X int i, j;
- X
- X clear_rect( TILE_RACKS_Y, TILE_RACKS_X,
- X! TILE_RACKS_Y + 7, TILE_RACKS_X + 24 );
- X for( i = 0; i < players; i++ ) {
- X move( TILE_RACKS_Y + i * 3, TILE_RACKS_X - 4 );
- X if( plr_skills[i] != 0 ) printw( "(%d)", plr_skills[i] );
- X! move( TILE_RACKS_Y + i * 3, TILE_RACKS_X );
- X if( i == human_player )
- X! printw( "Your tiles:" );
- X else
- X! printw( "%s tiles:", you[i] );
- X for( j = 0; j < 7; j++ ) {
- X addch( ' ' );
- X if( plr_tiles[i][j] > 0 ) {
- X--- 136,150 ----
- X int i, j;
- X
- X clear_rect( TILE_RACKS_Y, TILE_RACKS_X,
- X! TILE_RACKS_Y + 7, TILE_RACKS_X + 19 );
- X for( i = 0; i < players; i++ ) {
- X move( TILE_RACKS_Y + i * 3, TILE_RACKS_X - 4 );
- X if( plr_skills[i] != 0 ) printw( "(%d)", plr_skills[i] );
- X! move( TILE_RACKS_Y + i * 3, TILE_RACKS_X + 1 );
- X if( i == human_player )
- X! printw( " You:" );
- X else
- X! printw( "%s:", you[i] );
- X for( j = 0; j < 7; j++ ) {
- X addch( ' ' );
- X if( plr_tiles[i][j] > 0 ) {
- X***************
- X*** 150,156 ****
- X #endif
- X } else addch( ' ' );
- X }
- X! move( TILE_RACKS_Y + i * 3 + 1, TILE_RACKS_X + 5 );
- X printw( "Score: %3d", plr_scores[i] );
- X }
- X move( TILE_RACKS_Y + 12, TILE_RACKS_X - 2 );
- X--- 157,163 ----
- X #endif
- X } else addch( ' ' );
- X }
- X! move( TILE_RACKS_Y + i * 3 + 1, TILE_RACKS_X );
- X printw( "Score: %3d", plr_scores[i] );
- X }
- X move( TILE_RACKS_Y + 12, TILE_RACKS_X - 2 );
- X***************
- X*** 157,169 ****
- X i = 0;
- X if( b1x != 0 ) i++;
- X if( b2x != 0 ) i++;
- X! printw( "Blank tiles placed so far: %d", i );
- X if( b1x != 0 ) {
- X! move( TILE_RACKS_Y + 13, TILE_RACKS_X + 3 );
- X printw( "Row %2d, Column %2d (%c)", b1y, b1x, board[b1y][b1x] );
- X }
- X if( b2x != 0 ) {
- X! move( TILE_RACKS_Y + 14, TILE_RACKS_X + 3 );
- X printw( "Row %2d, Column %2d (%c)", b2y, b2x, board[b2y][b2x] );
- X }
- X move( TILE_RACKS_Y + human_player * 3, TILE_RACKS_X - 1 );
- X--- 164,176 ----
- X i = 0;
- X if( b1x != 0 ) i++;
- X if( b2x != 0 ) i++;
- X! printw( "Blank tiles placed: %d", i );
- X if( b1x != 0 ) {
- X! move( TILE_RACKS_Y + 13, TILE_RACKS_X - 1 );
- X printw( "Row %2d, Column %2d (%c)", b1y, b1x, board[b1y][b1x] );
- X }
- X if( b2x != 0 ) {
- X! move( TILE_RACKS_Y + 14, TILE_RACKS_X - 1 );
- X printw( "Row %2d, Column %2d (%c)", b2y, b2x, board[b2y][b2x] );
- X }
- X move( TILE_RACKS_Y + human_player * 3, TILE_RACKS_X - 1 );
- X***************
- X*** 187,201 ****
- X break;
- X }
- X tiles_left[i]--;
- X! print_tiles_left( tleft - 1 );
- X return( i == 26 ? CH_BL : i + 'A' );
- X }
- X
- X! print_tiles_left( t )
- X! int t;
- X! {
- X move( TILES_LEFT_Y, TILES_LEFT_X );
- X! printw( "Tiles left to draw: %3d", t );
- X }
- X
- X char get_key() {
- X--- 194,241 ----
- X break;
- X }
- X tiles_left[i]--;
- X! print_tiles_left();
- X return( i == 26 ? CH_BL : i + 'A' );
- X }
- X
- X! print_tiles_left() {
- X! int i, tleft;
- X!
- X! tleft = 0;
- X! for( i = 0; i < 27; i++ )
- X! tleft += tiles_left[i];
- X!
- X move( TILES_LEFT_Y, TILES_LEFT_X );
- X! printw( "Tiles left to draw: %3d", tleft );
- X! }
- X!
- X! print_passed_turns() {
- X! if( game_done == 0 ) clear_rect( 1, 50, 1, 79 );
- X! else {
- X! move( 1, 63 );
- X! printw( "Passed turns: %d", game_done );
- X! }
- X! refresh();
- X! }
- X!
- X! print_whos_move( plr ) {
- X! clear_turn();
- X! printw( "*** %s turn to play ", your[plr] );
- X! }
- X!
- X! print_version() {
- X! clear();
- X! printw( "*** SCRABBLE 1.30 ***\n\n" );
- X! }
- X!
- X! screen_redraw() {
- X! print_version();
- X! print_info();
- X! print_board();
- X! print_tiles_left( tiles_left );
- X! print_passed_turns();
- X! print_tiles();
- X! print_whos_move( human_player );
- X }
- X
- X char get_key() {
- X*** pmove.c.orig Wed Aug 19 11:58:07 1992
- X--- pmove.c Mon Oct 26 08:17:39 1992
- X***************
- X*** 12,22 ****
- X char c;
- X int xpos, ypos, done;
- X
- X! xpos = BOARD_LX;
- X! ypos = BOARD_UY;
- X for( ;; ) {
- X clear_prompt();
- X! printw( " Use the 'hjkl' keys to move the cursor.\n" );
- X printw( " Press <RETURN> on an empty square to start placing tiles on the board.\n" );
- X printw( " Press <SPACE> to rearrange your tiles.\n" );
- X printw( " Press '.' to use your turn to draw new tiles.\n" );
- X--- 12,22 ----
- X char c;
- X int xpos, ypos, done;
- X
- X! xpos = 1;
- X! ypos = 1;
- X for( ;; ) {
- X clear_prompt();
- X! printw( " Use the 'hjkl' keys to move the cursor, and control-L to refresh the screen.\n" );
- X printw( " Press <RETURN> on an empty square to start placing tiles on the board.\n" );
- X printw( " Press <SPACE> to rearrange your tiles.\n" );
- X printw( " Press '.' to use your turn to draw new tiles.\n" );
- X***************
- X*** 23,47 ****
- X refresh();
- X done = 0;
- X do {
- X! move( ypos, xpos );
- X refresh();
- X c = get_key();
- X switch( c ) {
- X case 'H':
- X! if( xpos > BOARD_LX ) xpos--;
- X break;
- X case 'L':
- X! if( xpos < BOARD_RX ) xpos++;
- X break;
- X case 'J':
- X! if( ypos < BOARD_LY ) ypos++;
- X break;
- X case 'K':
- X! if( ypos > BOARD_UY ) ypos--;
- X break;
- X case '\n':
- X! if( board[ypos - BOARD_UY + 1][xpos - BOARD_LX + 1] < 'A' )
- X! done = place_tiles( xpos, ypos );
- X break;
- X case ' ':
- X done = rearrange_tiles();
- X--- 23,50 ----
- X refresh();
- X done = 0;
- X do {
- X! #ifdef DBLSIZE_BOARD
- X! move( BOARD_UY + ypos - 1, BOARD_LX + xpos * 2 - 2 );
- X! #else
- X! move( BOARD_UY + ypos - 1, BOARD_LX + xpos - 1 );
- X! #endif
- X refresh();
- X c = get_key();
- X switch( c ) {
- X case 'H':
- X! if( xpos > 1 ) xpos--;
- X break;
- X case 'L':
- X! if( xpos < 15 ) xpos++;
- X break;
- X case 'J':
- X! if( ypos < 15 ) ypos++;
- X break;
- X case 'K':
- X! if( ypos > 1 ) ypos--;
- X break;
- X case '\n':
- X! if( board[ypos][xpos] < 'A' ) done = place_tiles( xpos, ypos );
- X break;
- X case ' ':
- X done = rearrange_tiles();
- X***************
- X*** 49,54 ****
- X--- 52,61 ----
- X case '.':
- X done = draw_new_tiles();
- X break;
- X+ case '':
- X+ screen_redraw();
- X+ done = -1;
- X+ break;
- X }
- X } while( done == 0 );
- X if( done == 1 ) break;
- X***************
- X*** 83,89 ****
- X show_instructions();
- X placed = 0;
- X for( ;; ) {
- X! move( ypos, xpos );
- X refresh();
- X c = get_key();
- X if( c == '-' || c == 127 || c == 8 ) {
- X--- 90,100 ----
- X show_instructions();
- X placed = 0;
- X for( ;; ) {
- X! #ifdef DBLSIZE_BOARD
- X! move( BOARD_UY + ypos - 1, BOARD_LX + xpos * 2 - 2 );
- X! #else
- X! move( BOARD_UY + ypos - 1, BOARD_LX + xpos - 1 );
- X! #endif
- X refresh();
- X c = get_key();
- X if( c == '-' || c == 127 || c == 8 ) {
- X***************
- X*** 92,99 ****
- X do {
- X xpos -= xinc;
- X ypos -= yinc;
- X! } while( board[ypos - BOARD_UY + 1][xpos - BOARD_LX + 1] >= 'A' );
- X! move( ypos, xpos );
- X addch( newlet[placed].oldlet );
- X plr_tiles[human_player][newlet[placed].tilepos]
- X = newlet[placed].letter;
- X--- 103,114 ----
- X do {
- X xpos -= xinc;
- X ypos -= yinc;
- X! } while( board[ypos][xpos] >= 'A' );
- X! #ifdef DBLSIZE_BOARD
- X! move( BOARD_UY + ypos - 1, BOARD_LX + xpos * 2 - 2 );
- X! #else
- X! move( BOARD_UY + ypos - 1, BOARD_LX + xpos - 1 );
- X! #endif
- X addch( newlet[placed].oldlet );
- X plr_tiles[human_player][newlet[placed].tilepos]
- X = newlet[placed].letter;
- X***************
- X*** 103,110 ****
- X do {
- X xpos -= xinc;
- X ypos -= yinc;
- X! } while( board[ypos - BOARD_UY + 1][xpos - BOARD_LX + 1] >= 'A' );
- X! move( ypos, xpos );
- X addch( newlet[placed].oldlet );
- X plr_tiles[human_player][newlet[placed].tilepos]
- X = newlet[placed].letter;
- X--- 118,129 ----
- X do {
- X xpos -= xinc;
- X ypos -= yinc;
- X! } while( board[ypos][xpos] >= 'A' );
- X! #ifdef DBLSIZE_BOARD
- X! move( BOARD_UY + ypos - 1, BOARD_LX + xpos * 2 - 2 );
- X! #else
- X! move( BOARD_UY + ypos - 1, BOARD_LX + xpos - 1 );
- X! #endif
- X addch( newlet[placed].oldlet );
- X plr_tiles[human_player][newlet[placed].tilepos]
- X = newlet[placed].letter;
- X***************
- X*** 191,197 ****
- X } else press_return();
- X show_instructions();
- X } else {
- X! if( xpos > BOARD_RX || ypos > BOARD_LY ) continue;
- X tile = -1;
- X for( i = 0; i < 7; i++ ) {
- X if( c == plr_tiles[human_player][i] ) tile = i;
- X--- 210,216 ----
- X } else press_return();
- X show_instructions();
- X } else {
- X! if( xpos > 15 || ypos > 15 ) continue;
- X tile = -1;
- X for( i = 0; i < 7; i++ ) {
- X if( c == plr_tiles[human_player][i] ) tile = i;
- X***************
- X*** 203,212 ****
- X newlet[placed].blankchar = c;
- X newlet[placed].letter = plr_tiles[human_player][tile];
- X plr_tiles[human_player][tile] = 0;
- X! newlet[placed].x = xpos - BOARD_LX + 1;
- X! newlet[placed].y = ypos - BOARD_UY + 1;
- X! newlet[placed].oldlet =
- X! board[ypos - BOARD_UY + 1][xpos - BOARD_LX + 1];
- X if( newlet[placed].oldlet == CH_DW ) newlet[placed].oldlet = 'o';
- X newlet[placed].tilepos = tile;
- X addch( newlet[placed].letter );
- X--- 222,230 ----
- X newlet[placed].blankchar = c;
- X newlet[placed].letter = plr_tiles[human_player][tile];
- X plr_tiles[human_player][tile] = 0;
- X! newlet[placed].x = xpos;
- X! newlet[placed].y = ypos;
- X! newlet[placed].oldlet = board[ypos][xpos];
- X if( newlet[placed].oldlet == CH_DW ) newlet[placed].oldlet = 'o';
- X newlet[placed].tilepos = tile;
- X addch( newlet[placed].letter );
- X***************
- X*** 213,220 ****
- X do {
- X xpos += xinc;
- X ypos += yinc;
- X! } while( board[ypos - BOARD_UY + 1][xpos - BOARD_LX + 1] >= 'A'
- X! && xpos <= BOARD_RX && ypos <= BOARD_LY );
- X print_tiles();
- X placed++;
- X }
- X--- 231,237 ----
- X do {
- X xpos += xinc;
- X ypos += yinc;
- X! } while( board[ypos][xpos] >= 'A' && xpos <= 15 && ypos <= 15 );
- X print_tiles();
- X placed++;
- X }
- X*** score.c.orig Tue Aug 4 11:26:00 1992
- X--- score.c Mon Oct 26 08:17:42 1992
- X***************
- X*** 98,103 ****
- X--- 98,104 ----
- X
- X f = wlen[strlen( word )];
- X l = wlen[strlen( word ) + 1] - 1;
- X+ if( f > l ) return( 0 );
- X found = 0;
- X do {
- X m = ( f + l ) / 2;
- X***************
- X*** 143,148 ****
- X--- 144,150 ----
- X }
- X printw( "%s ", word );
- X score += new_words[i].score;
- X+ xloc += strlen( word ) + 2;
- X if( bin_search( word ) == 0 ) {
- X ind[illword++] = i;
- X }
- X***************
- X*** 156,163 ****
- X }
- X for( i = 0; i < illword; i++ ) {
- X clear_rect( 21, 0, 22, 79 );
- X printw( " %s is not in the computer's dictionary.\n",
- X! &(new_words[i].letters[0]) );
- X printw( " Is it a valid Scrabble word (y/n)? " );
- X refresh();
- X do {
- X--- 158,166 ----
- X }
- X for( i = 0; i < illword; i++ ) {
- X clear_rect( 21, 0, 22, 79 );
- X+ j = ind[i];
- X printw( " %s is not in the computer's dictionary.\n",
- X! &(new_words[j].letters[0]) );
- X printw( " Is it a valid Scrabble word (y/n)? " );
- X refresh();
- X do {
- X***************
- X*** 166,174 ****
- X if( c == 'N' ) break;
- X clear_rect( 21, 0, 22, 79 );
- X printw( " Inserting %s into the dictionary...",
- X! &(new_words[i].letters[0]) );
- X refresh();
- X! add_dict( &(new_words[i].letters[0]) );
- X dict_changed = 1;
- X }
- X clear_rect( 21, 0, 22, 79 );
- X--- 169,177 ----
- X if( c == 'N' ) break;
- X clear_rect( 21, 0, 22, 79 );
- X printw( " Inserting %s into the dictionary...",
- X! &(new_words[j].letters[0]) );
- X refresh();
- X! add_dict( &(new_words[j].letters[0]) );
- X dict_changed = 1;
- X }
- X clear_rect( 21, 0, 22, 79 );
- X***************
- X*** 246,258 ****
- X for( p1 = wlen[l];
- X p1 < wlen[l + 1] && strcmp( word, &(words[wptr[p1]]) ) > 0;
- X p1++ );
- X! for( p2 = dict_size - 1; p2 >= wptr[p1]; p2-- ) words[p2 + l + 1] = words[p2];
- X! for( p2 = wlen[16]; p2 > p1; p2-- ) wptr[p2] = wptr[p2 - 1] + l + 1;
- X for( i = l + 1; i < 17; i++ ) wlen[i]++;
- X strcpy( &(words[wptr[p1]]), word );
- X dict_size += l + 1;
- X /* printw( "\n " );
- X! for( p2 = p1 - 2; p2 < p1 + 3; p2++ )
- X printw( "%s ", &(words[wptr[p2]]) );
- X printw( "%s %s", &(words[wptr[wlen[8]]]), &(words[wptr[wlen[16] - 1]]) );
- X press_return(); */
- X--- 249,261 ----
- X for( p1 = wlen[l];
- X p1 < wlen[l + 1] && strcmp( word, &(words[wptr[p1]]) ) > 0;
- X p1++ );
- X! for( p2 = dict_size; p2 >= wptr[p1]; p2-- ) words[p2 + l + 1] = words[p2];
- X! for( p2 = wlen[16] + 1; p2 > p1; p2-- ) wptr[p2] = wptr[p2 - 1] + l + 1;
- X for( i = l + 1; i < 17; i++ ) wlen[i]++;
- X strcpy( &(words[wptr[p1]]), word );
- X dict_size += l + 1;
- X /* printw( "\n " );
- X! for( p2 = ( p1 - 2 >= 0 ? p1 - 2 : 0 ); p2 < p1 + 3 && p2 <= wlen[16]; p2++ )
- X printw( "%s ", &(words[wptr[p2]]) );
- X printw( "%s %s", &(words[wptr[wlen[8]]]), &(words[wptr[wlen[16] - 1]]) );
- X press_return(); */
- X*** scrab.h.orig Tue Sep 15 13:42:33 1992
- X--- scrab.h Mon Oct 26 08:17:45 1992
- X***************
- X*** 19,35 ****
- X #define CH_BL '*'
- X #define CH_IT '_'
- X
- X- #define BOARD_UY 2
- X- #define BOARD_LY 16
- X- #define BOARD_LX 34
- X- #define BOARD_RX 48
- X #define INFO_Y 2
- X #define INFO_X 0
- X #define TILE_RACKS_Y 2
- X! #define TILE_RACKS_X 54
- X #define TILES_LEFT_Y 0
- X #define TILES_LEFT_X 57
- X /* #define PRINT_CPU_TILES */
- X
- X #define DICT_FILE "scrabbledict"
- X
- X--- 19,45 ----
- X #define CH_BL '*'
- X #define CH_IT '_'
- X
- X #define INFO_Y 2
- X #define INFO_X 0
- X #define TILE_RACKS_Y 2
- X! #define TILE_RACKS_X 59
- X #define TILES_LEFT_Y 0
- X #define TILES_LEFT_X 57
- X+
- X /* #define PRINT_CPU_TILES */
- X+ /* #define DBLSIZE_BOARD */
- X+
- X+ #ifdef DBLSIZE_BOARD
- X+ #define BOARD_UY 2
- X+ #define BOARD_LY 16
- X+ #define BOARD_LX 25
- X+ #define BOARD_RX 53
- X+ #else
- X+ #define BOARD_UY 2
- X+ #define BOARD_LY 16
- X+ #define BOARD_LX 32
- X+ #define BOARD_RX 46
- X+ #endif
- X
- X #define DICT_FILE "scrabbledict"
- X
- X*** scrabble.6.orig Wed Sep 16 12:46:16 1992
- X--- scrabble.6 Mon Oct 26 08:17:46 1992
- X***************
- X*** 1,5 ****
- X! .\" @(#)scrabble.6 1.02 92/09/16 JAC
- X! .TH SCRABBLE 6 "16 September 1992"
- X .SH NAME
- X scrabble \- play the Scrabble(TM) board game
- X .SH SYNOPSIS
- X--- 1,5 ----
- X! .\" @(#)scrabble.6 1.03 92/09/16 JAC
- X! .TH SCRABBLE 6 "5 October 1992"
- X .SH NAME
- X scrabble \- play the Scrabble(TM) board game
- X .SH SYNOPSIS
- X***************
- X*** 7,13 ****
- X .SH DESCRIPTION
- X .LP
- X .B scrabble
- X! is a computer version of the Selchow & Righter board game, Scrabble.
- X Only one human player plays; the user may select the number of
- X computer opponents, from one to three.
- X .SH BASIC SCRABBLE RULES
- X--- 7,13 ----
- X .SH DESCRIPTION
- X .LP
- X .B scrabble
- X! is a computer version of the Milton Bradley board game, Scrabble.
- X Only one human player plays; the user may select the number of
- X computer opponents, from one to three.
- X .SH BASIC SCRABBLE RULES
- X***************
- X*** 241,246 ****
- X--- 241,250 ----
- X l
- X Moves the cursor right. If the cursor is on the right edge
- X of the board, this key has no effect.
- X+ .TP
- X+ ^L
- X+ Redraws the screen. This is provided in case the screen
- X+ should somehow become corrupted.
- X .TP
- X RETURN
- X Starts placing tiles on the board. If the cursor is over
- X*** smain.c.orig Tue Sep 15 13:45:37 1992
- X--- smain.c Mon Oct 26 08:17:43 1992
- X***************
- X*** 76,96 ****
- X move( INFO_Y + 5, INFO_X + 2 );
- X printw( "%c: Blank tile", CH_BL );
- X move( INFO_Y + 7, INFO_X );
- X! printw( "Tile values & distributions:" );
- X move( INFO_Y + 8, INFO_X + 2 );
- X! printw( "A-1, 9 H-4, 2 O-1, 8 V-4, 2" );
- X move( INFO_Y + 9, INFO_X + 2 );
- X! printw( "B-3, 2 I-1, 9 P-3, 2 W-4, 2" );
- X move( INFO_Y +10, INFO_X + 2 );
- X! printw( "C-3, 2 J-8, 1 Q10, 1 X-8, 1" );
- X move( INFO_Y +11, INFO_X + 2 );
- X! printw( "D-2, 4 K-5, 1 R-1, 6 Y-4, 2" );
- X! move( INFO_Y +12, INFO_X + 2 );
- X! printw( "E-1,12 L-1, 4 S-1, 4 Z10, 1" );
- X move( INFO_Y +13, INFO_X + 2 );
- X! printw( "F-4, 2 M-3, 2 T-1, 6 %c-0, 2", CH_BL );
- X move( INFO_Y +14, INFO_X + 2 );
- X! printw( "G-2, 3 N-1, 6 U-1, 4" );
- X refresh();
- X }
- X
- X--- 76,96 ----
- X move( INFO_Y + 5, INFO_X + 2 );
- X printw( "%c: Blank tile", CH_BL );
- X move( INFO_Y + 7, INFO_X );
- X! printw( "Tile distribs & values:" );
- X move( INFO_Y + 8, INFO_X + 2 );
- X! printw( "9A1 2H4 8O1 2V4" );
- X move( INFO_Y + 9, INFO_X + 2 );
- X! printw( "2B3 9I1 2P3 2W4" );
- X move( INFO_Y +10, INFO_X + 2 );
- X! printw( "2C3 1J8 1Q10 1X8" );
- X move( INFO_Y +11, INFO_X + 2 );
- X! printw( "4D2 1K5 6R1 2Y4" );
- X! move( INFO_Y +12, INFO_X + 1 );
- X! printw( "12E1 4L1 4S1 1Z10" );
- X move( INFO_Y +13, INFO_X + 2 );
- X! printw( "2F4 2M3 6T1 2%c0", CH_BL );
- X move( INFO_Y +14, INFO_X + 2 );
- X! printw( "3G2 6N1 4U1" );
- X refresh();
- X }
- X
- X***************
- X*** 144,150 ****
- X if( j == 4 ) strcpy( cs, "fourth" );
- X printw( "\n You will play %s.", cs );
- X human_player = j - 1;
- X! print_tiles_left( 100 );
- X press_return();
- X clear_prompt();
- X refresh();
- X--- 144,150 ----
- X if( j == 4 ) strcpy( cs, "fourth" );
- X printw( "\n You will play %s.", cs );
- X human_player = j - 1;
- X! print_tiles_left();
- X press_return();
- X clear_prompt();
- X refresh();
- X***************
- X*** 300,313 ****
- X int i;
- X
- X set_up_window();
- X! clear();
- X! printw( "*** SCRABBLE 1.21 ***\n\n" );
- X
- X read_words();
- X dict_changed = 0;
- X
- X! clear();
- X! printw( "*** SCRABBLE 1.21 ***\n\n" );
- X
- X init_board();
- X seed_random();
- X--- 300,311 ----
- X int i;
- X
- X set_up_window();
- X! print_version();
- X
- X read_words();
- X dict_changed = 0;
- X
- X! print_version();
- X
- X init_board();
- X seed_random();
- X***************
- X*** 319,326 ****
- X abort = 0;
- X do {
- X for( plr = 0; plr < players; plr++ ) {
- X! clear_turn();
- X! printw( "*** %s turn to play ", your[plr] );
- X if( plr == human_player ) {
- X player_move();
- X } else {
- X--- 317,323 ----
- X abort = 0;
- X do {
- X for( plr = 0; plr < players; plr++ ) {
- X! print_whos_move( plr );
- X if( plr == human_player ) {
- X player_move();
- X } else {
- X***************
- X*** 327,338 ****
- X computer_move( plr );
- X }
- X if( abort != 0 ) break;
- X! if( game_done == 0 ) clear_rect( 1, 50, 1, 79 );
- X! else {
- X! move( 1, 64 );
- X! printw( "Passed turns: %d", game_done );
- X! }
- X! refresh();
- X if( game_done == players ) break;
- X for( i = 0; i < 7; i++ )
- X if( plr_tiles[plr][i] != 0 ) break;
- X--- 324,330 ----
- X computer_move( plr );
- X }
- X if( abort != 0 ) break;
- X! print_passed_turns();
- X if( game_done == players ) break;
- X for( i = 0; i < 7; i++ )
- X if( plr_tiles[plr][i] != 0 ) break;
- X*** /dev/null Mon Oct 26 08:10:12 1992
- X--- CHANGES Mon Oct 26 08:19:02 1992
- X***************
- X*** 0 ****
- X--- 1,53 ----
- X+ Here is a list of people who suggested changes to scrabble, followed by my
- X+ responses to them
- X+
- X+
- X+ 1. alainc%tollys.UUCP%bnrmtl.UUCP@Larry.McRCIM.McGill.EDU (Alain Caron)
- X+ was trying to get scrabble to work with a french dictionary, and there were
- X+ bugs in the dictionary insertion routine. They have now been fixed.
- X+ These bugs were quite serious.
- X+
- X+ 2. "Bradley D. Keister" <keister@poincare.phys.cmu.edu> noticed some problems
- X+ once with how scrabble was displayed on his screen. As well, Nick Sayer
- X+ <mrapple@quack.sac.ca.us> recommended that a redraw screen key be added.
- X+
- X+ Now, the screen may be redrawn by pressing ctrl-L when it is the human
- X+ player's turn. It may only be used when moving around the board with the
- X+ 'hjkl' keys; if you are placing tiles or anything else, you must press ESC
- X+ before pressing ctrl-L. As well, it cannot be redrawn when the computer
- X+ players are playing. The justification for this is that, the computer play-
- X+ ers don't actually care about the screen layout when they're playing a move
- X+ whereas the human player does. Thus, it seemed acceptable that only during
- X+ the human player's turn may the screen be redrawn.
- X+
- X+ 3. wixer!cb@cs.utexas.edu (Cyberspace Buddha) recommended the use of the
- X+ Official Scrabble Players' Dictionary with scrabble. He tells me a copy
- X+ may be obtained from
- X+
- X+ Christopher Hall
- X+ P.O. Box 26025
- X+ Austin, Tx 78755-0025
- X+
- X+ FidoNet : 1:382/29.4
- X+ CompuServe : 72150,752
- X+
- X+ 4. Nick Sayer <mrapple@quack.sac.ca.us> recommended that the board width be
- X+ doubled, partly to make the board look more square, and partly to allow
- X+ reverse-video to be displayed on "magic-cookie" type terminals.
- X+
- X+ Now, the file scrab.h has a preprocessor directive which may be uncommented:
- X+
- X+ /* #define DBLSIZE_BOARD */
- X+
- X+ If this directive is uncommented, the board width doubles. Otherwise, it
- X+ remains as narrow as in V1.21. I prefer the narrow board, myself.
- X+
- X+ 5. sthomas@serene.clipper.ingr.com (Steve Thomas) points out that, in fact,
- X+ Selchow and Righter no longer own the rights to scrabble. Depending on the
- X+ country, the rights are now owned by Milton Bradley or JW Spear & Sons.
- X+
- X+ As well, Steve had a number of good suggestions for improving the computer
- X+ players' speed. He recommended a form of rack management, and he directed
- X+ me to an article by Appel & Jacobson about how to improve the computer. I
- X+ have not implemented his suggestions yet. Maybe later...
- X+
- END_OF_FILE
- if test 22997 -ne `wc -c <'patches01'`; then
- echo shar: \"'patches01'\" unpacked with wrong size!
- fi
- # end of 'patches01'
- fi
- echo shar: End of shell archive.
- exit 0
-