Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
0dd8fd06
Commit
0dd8fd06
authored
Sep 12, 2018
by
antirez
Browse files
LOLWUT: change default size to fit a normal terminal better.
parent
43385c43
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lolwut.c
View file @
0dd8fd06
...
@@ -197,8 +197,8 @@ lwCanvas *lwDrawSchotter(int console_cols, int squares_per_row, int squares_per_
...
@@ -197,8 +197,8 @@ lwCanvas *lwDrawSchotter(int console_cols, int squares_per_row, int squares_per_
if
(
rand
()
%
2
)
r2
=
-
r2
;
if
(
rand
()
%
2
)
r2
=
-
r2
;
if
(
rand
()
%
2
)
r3
=
-
r3
;
if
(
rand
()
%
2
)
r3
=
-
r3
;
angle
=
r1
;
angle
=
r1
;
sx
+=
r2
*
square_side
/
5
;
sx
+=
r2
*
square_side
/
4
;
sy
+=
r3
*
square_side
/
5
;
sy
+=
r3
*
square_side
/
4
;
}
}
lwDrawSquare
(
canvas
,
sx
,
sy
,
square_side
,
angle
);
lwDrawSquare
(
canvas
,
sx
,
sy
,
square_side
,
angle
);
}
}
...
@@ -240,13 +240,13 @@ sds lwRenderCanvas(lwCanvas *canvas) {
...
@@ -240,13 +240,13 @@ sds lwRenderCanvas(lwCanvas *canvas) {
*
*
* LOLWUT [terminal columns] [squares-per-row] [squares-per-col]
* LOLWUT [terminal columns] [squares-per-row] [squares-per-col]
*
*
* By default the command uses
80
columns,
6
squares per row, 1
0
squares
* By default the command uses
66
columns,
8
squares per row, 1
2
squares
* per column.
* per column.
*/
*/
void
lolwutCommand
(
client
*
c
)
{
void
lolwutCommand
(
client
*
c
)
{
long
cols
=
80
;
long
cols
=
66
;
long
squares_per_row
=
6
;
long
squares_per_row
=
8
;
long
squares_per_col
=
1
0
;
long
squares_per_col
=
1
2
;
/* Parse the optional arguments if any. */
/* Parse the optional arguments if any. */
if
(
c
->
argc
>
1
&&
if
(
c
->
argc
>
1
&&
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment