diff options
author | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-03-12 20:22:06 +0800 |
---|---|---|
committer | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-03-12 20:22:06 +0800 |
commit | fce1fb238a12c36134f81f3e054b3be550fcbc23 (patch) | |
tree | 4082e54cb62a8bcb4bb72c1960b3de4485c9d82b /mbbsd/dark.c | |
parent | a49019fc3c2b25f90b0a1fc1162e5e2c80efdecd (diff) | |
download | pttbbs-fce1fb238a12c36134f81f3e054b3be550fcbc23.tar pttbbs-fce1fb238a12c36134f81f3e054b3be550fcbc23.tar.gz pttbbs-fce1fb238a12c36134f81f3e054b3be550fcbc23.tar.bz2 pttbbs-fce1fb238a12c36134f81f3e054b3be550fcbc23.tar.lz pttbbs-fce1fb238a12c36134f81f3e054b3be550fcbc23.tar.xz pttbbs-fce1fb238a12c36134f81f3e054b3be550fcbc23.tar.zst pttbbs-fce1fb238a12c36134f81f3e054b3be550fcbc23.zip |
r2623@m722: kcwu | 2005-03-12 20:21:28 +0800
split long lines
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2604 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/dark.c')
-rw-r--r-- | mbbsd/dark.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/mbbsd/dark.c b/mbbsd/dark.c index ad51cf16..9fe17eb8 100644 --- a/mbbsd/dark.c +++ b/mbbsd/dark.c @@ -102,8 +102,10 @@ brd_rand(struct DarkData *dd) { sint y, x, index; sint tem[32]; - sint value[32] = {0, 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, - 0, 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6}; + sint value[32] = { + 0, 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, + 0, 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6 + }; bzero(dd->brd, sizeof(dd->brd)); bzero(tem, sizeof(tem)); @@ -287,7 +289,9 @@ playing(struct DarkData *dd, sint fd, sint color, sint ch, sint * b, userinfo_t case 'u': move(0, 0); clrtoeol(); - prints("%s色%s cont=%d", (dd->brd[dd->my][dd->mx].color == RED) ? "紅" : "黑", rname[dd->brd[dd->my][dd->mx].value], dd->cont); + prints("%s色%s cont=%d", + (dd->brd[dd->my][dd->mx].color == RED) ? "紅" : "黑", + rname[dd->brd[dd->my][dd->mx].value], dd->cont); *b = -1; break; case '\r': /* 吃 or 移動 ly跟lx必須大於0 */ @@ -297,7 +301,8 @@ playing(struct DarkData *dd, sint fd, sint color, sint ch, sint * b, userinfo_t && dd->brd[dd->mly][dd->mlx].color != dd->brd[dd->my][dd->mx].color /* 同色不能移動也不能吃 */ && - (Is_move(dd, dd->my, dd->mx, dd->mly, dd->mlx) || Is_win(dd, dd->brd[dd->mly][dd->mlx], dd->brd[dd->my][dd->mx], dd->my, dd->mx, dd->mly, dd->mlx)) + (Is_move(dd, dd->my, dd->mx, dd->mly, dd->mlx) || + Is_win(dd, dd->brd[dd->mly][dd->mlx], dd->brd[dd->my][dd->mx], dd->my, dd->mx, dd->mly, dd->mlx)) ) { if (dd->fix && dd->brd[dd->my][dd->mx].value < 0) { *b = -1; @@ -309,7 +314,10 @@ playing(struct DarkData *dd, sint fd, sint color, sint ch, sint * b, userinfo_t else dd->rcount--; move(dd->cur_eaty, dd->cur_eatx); - outs((color) ? bname[dd->brd[dd->my][dd->mx].value] : rname[dd->brd[dd->my][dd->mx].value]); + if(color) + outs(bname[dd->brd[dd->my][dd->mx].value]); + else + outs(rname[dd->brd[dd->my][dd->mx].value]); if (dd->cur_eatx >= 26) { dd->cur_eatx = 5; dd->cur_eaty++; |