Skip to content

Commit 2ff529f

Browse files
CrispStrobeclaude
andcommitted
Brickwright: remove Feedback button, rename tab to Pseudocode, sync games
- Remove the (TurboWarp author) Feedback button from the menu bar. - Rename the editor tab 'Script' -> 'Pseudocode' (in German 'Script' clashed with the Code tab's 'Skripte'; 'Pseudocode' is unambiguous everywhere). - Sync vendored sb3-creator: tile/text costumes, pen-colour blocks, and the game fixes (ball speeds, tic-tac-toe + 2048 tiles, flappy, digital art). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent b000766 commit 2ff529f

4 files changed

Lines changed: 141 additions & 74 deletions

File tree

‎src/components/gui/gui.jsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -391,10 +391,10 @@ const GUIComponent = props => {
391391
/>
392392
</Tab>
393393
<Tab className={tabClassNames.tab}>
394-
<span role="img" aria-label="script" style={{marginRight: 4}}>{'📜'}</span>
394+
<span role="img" aria-label="pseudocode" style={{marginRight: 4}}>{'📜'}</span>
395395
<FormattedMessage
396-
defaultMessage="Script"
397-
description="Button to get to the Brickwright pseudocode / code panel"
396+
defaultMessage="Pseudocode"
397+
description="Button to get to the Brickwright pseudocode panel"
398398
id="gui.gui.pseudocodeTab"
399399
/>
400400
</Tab>

‎src/components/menu-bar/menu-bar.jsx‎

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,27 +1011,6 @@ class MenuBar extends React.Component {
10111011
/>
10121012
) : []))}
10131013
</div>
1014-
{/* tw: add a feedback button */}
1015-
<div className={styles.menuBarItem}>
1016-
<a
1017-
className={styles.feedbackLink}
1018-
href="https://scratch.mit.edu/users/GarboMuffin/#comments"
1019-
rel="noopener noreferrer"
1020-
target="_blank"
1021-
>
1022-
{/* todo: icon */}
1023-
<Button className={styles.feedbackButton}>
1024-
<FormattedMessage
1025-
defaultMessage="{APP_NAME} Feedback"
1026-
description="Button to give feedback in the menu bar"
1027-
id="tw.feedbackButton"
1028-
values={{
1029-
APP_NAME
1030-
}}
1031-
/>
1032-
</Button>
1033-
</a>
1034-
</div>
10351014
</div>
10361015

10371016
<div className={styles.accountInfoGroup}>

‎src/lib/sb3-creator-examples.js‎

Lines changed: 66 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -200,16 +200,19 @@ STAGE:
200200

201201
art: `SPRITE Pen:
202202
WHEN flag clicked:
203+
hide
203204
clear
204205
go to x: 0 y: 0
205206
pen down
206-
set pen size to 5
207-
207+
set pen size to 3
208+
set pen color to #4c97ff
209+
208210
WHEN space key pressed:
209211
REPEAT 72:
212+
change pen color by 4
210213
move 150 steps
211214
turn left 175 degrees
212-
215+
213216
WHEN c key pressed:
214217
clear`,
215218

@@ -429,8 +432,8 @@ SPRITE Ball:
429432
WHEN flag clicked:
430433
set bx to 0
431434
set by to -120
432-
set vx to 4
433-
set vy to 5
435+
set vx to 7
436+
set vy to 9
434437
go to x: bx y: by
435438
show
436439
WHEN flag clicked:
@@ -452,7 +455,6 @@ SPRITE Ball:
452455
IF lives < 1 THEN:
453456
say "Game Over" for 2 seconds
454457
stop all
455-
wait 0.01 seconds
456458
457459
SPRITE Brick:
458460
SHAPE rect 42 18
@@ -885,7 +887,8 @@ GLOBAL bally
885887
SPRITE PaddleL:
886888
SHAPE rect 16 90
887889
WHEN flag clicked:
888-
show variable score
890+
show variable scoreL
891+
show variable scoreR
889892
set ly to 0
890893
go to x: -220 y: ly
891894
show
@@ -926,8 +929,8 @@ SPRITE Ball:
926929
set scoreR to 0
927930
set ballx to 0
928931
set bally to 0
929-
set vx to 5
930-
set vy to 3
932+
set vx to 8
933+
set vy to 5
931934
go to x: ballx y: bally
932935
show
933936
WHEN flag clicked:
@@ -953,8 +956,7 @@ SPRITE Ball:
953956
go to x: ballx y: bally
954957
IF scoreL > 4 or scoreR > 4 THEN:
955958
say "Game Over" for 2 seconds
956-
stop all
957-
wait 0.016 seconds`,
959+
stop all`,
958960

959961
pong_ai: `# Pong (vs AI) — you are the left paddle (W/S). The right paddle is a computer that
960962
# tracks the ball, reading the ball's position with "y position of Ball" (sensing_of).
@@ -964,7 +966,8 @@ GLOBAL scoreR
964966
SPRITE PaddleL:
965967
SHAPE rect 16 90
966968
WHEN flag clicked:
967-
show variable score
969+
show variable scoreL
970+
show variable scoreR
968971
set ly to 0
969972
go to x: -220 y: ly
970973
show
@@ -1006,8 +1009,8 @@ SPRITE Ball:
10061009
set scoreR to 0
10071010
set bx to 0
10081011
set by to 0
1009-
set vx to 5
1010-
set vy to 3
1012+
set vx to 8
1013+
set vy to 5
10111014
go to x: bx y: by
10121015
show
10131016
WHEN flag clicked:
@@ -1033,8 +1036,7 @@ SPRITE Ball:
10331036
go to x: bx y: by
10341037
IF scoreL > 4 or scoreR > 4 THEN:
10351038
say "Game Over" for 2 seconds
1036-
stop all
1037-
wait 0.016 seconds`,
1039+
stop all`,
10381040

10391041
sokoban: `# Sokoban — push the boxes onto the goals. Arrow keys move. The 8x7 level lives in
10401042
# two lists (walls/boxes + goals); custom blocks handle movement, rendering (cells are
@@ -1266,12 +1268,12 @@ SPRITE Pipe:
12661268
hide
12671269
WHEN flag clicked:
12681270
FOREVER:
1269-
set gapy to pick random -70 to 70
1270-
go to x: 240 y: gapy + 150
1271+
set gapy to pick random -60 to 60
1272+
go to x: 240 y: gapy + 190
12711273
create clone of myself
1272-
go to x: 240 y: gapy - 150
1274+
go to x: 240 y: gapy - 190
12731275
create clone of myself
1274-
wait 1.8 seconds
1276+
wait 2.4 seconds
12751277
WHEN I start as a clone:
12761278
show
12771279
REPEAT UNTIL x position < -240:
@@ -1294,6 +1296,9 @@ GLOBAL vc
12941296
12951297
SPRITE Board:
12961298
LIST board
1299+
COSTUME blank tile "" #dfe9ff
1300+
COSTUME x tile "X" #ffffff #e63946
1301+
COSTUME o tile "O" #ffffff #457b9d
12971302
12981303
DEFINE FAST reset:
12991304
delete all of board
@@ -1325,14 +1330,14 @@ SPRITE Board:
13251330
set i to 0
13261331
REPEAT 9:
13271332
set v to item (i + 1) of board
1333+
IF v = 0 THEN:
1334+
switch costume to blank
13281335
IF v = 1 THEN:
1329-
set color effect to 0
1330-
go to x: (-80) + ((i mod 3) * 80) y: (80) - ((floor of (i / 3)) * 80)
1331-
stamp
1336+
switch costume to x
13321337
IF v = 2 THEN:
1333-
set color effect to 100
1334-
go to x: (-80) + ((i mod 3) * 80) y: (80) - ((floor of (i / 3)) * 80)
1335-
stamp
1338+
switch costume to o
1339+
go to x: (-80) + ((i mod 3) * 80) y: (80) - ((floor of (i / 3)) * 80)
1340+
stamp
13361341
change i by 1
13371342
13381343
DEFINE place at (r) (c):
@@ -1350,8 +1355,8 @@ SPRITE Board:
13501355
set turn to 1
13511356
13521357
WHEN flag clicked:
1353-
set size to 55
1354-
show
1358+
set size to 100
1359+
hide
13551360
reset
13561361
render
13571362
FOREVER:
@@ -1381,6 +1386,9 @@ GLOBAL done
13811386
13821387
SPRITE Board:
13831388
LIST board
1389+
COSTUME blank tile "" #dfe9ff
1390+
COSTUME x tile "X" #ffffff #e63946
1391+
COSTUME o tile "O" #ffffff #457b9d
13841392
13851393
DEFINE FAST reset:
13861394
delete all of board
@@ -1412,14 +1420,14 @@ SPRITE Board:
14121420
set i to 0
14131421
REPEAT 9:
14141422
set v to item (i + 1) of board
1423+
IF v = 0 THEN:
1424+
switch costume to blank
14151425
IF v = 1 THEN:
1416-
set color effect to 0
1417-
go to x: (-80) + ((i mod 3) * 80) y: (80) - ((floor of (i / 3)) * 80)
1418-
stamp
1426+
switch costume to x
14191427
IF v = 2 THEN:
1420-
set color effect to 100
1421-
go to x: (-80) + ((i mod 3) * 80) y: (80) - ((floor of (i / 3)) * 80)
1422-
stamp
1428+
switch costume to o
1429+
go to x: (-80) + ((i mod 3) * 80) y: (80) - ((floor of (i / 3)) * 80)
1430+
stamp
14231431
change i by 1
14241432
14251433
DEFINE place at (r) (c):
@@ -1476,8 +1484,8 @@ SPRITE Board:
14761484
change k by 1
14771485
14781486
WHEN flag clicked:
1479-
set size to 55
1480-
show
1487+
set size to 100
1488+
hide
14811489
reset
14821490
render
14831491
FOREVER:
@@ -1527,9 +1535,20 @@ GLOBAL r
15271535
GLOBAL c
15281536
15291537
SPRITE Board:
1530-
SHAPE square 100
15311538
LIST grid
15321539
LIST linebuf
1540+
COSTUME blank tile "" #cdc1b4
1541+
COSTUME t2 tile "2" #eee4da #776e65
1542+
COSTUME t4 tile "4" #ede0c8 #776e65
1543+
COSTUME t8 tile "8" #f2b179 #ffffff
1544+
COSTUME t16 tile "16" #f59563 #ffffff
1545+
COSTUME t32 tile "32" #f67c5f #ffffff
1546+
COSTUME t64 tile "64" #f65e3b #ffffff
1547+
COSTUME t128 tile "128" #edcf72 #ffffff
1548+
COSTUME t256 tile "256" #edcc61 #ffffff
1549+
COSTUME t512 tile "512" #edc850 #ffffff
1550+
COSTUME t1024 tile "1024" #edc53f #ffffff
1551+
COSTUME t2048 tile "2048" #edc22e #ffffff
15331552
15341553
DEFINE FAST reset:
15351554
delete all of grid
@@ -1594,12 +1613,14 @@ SPRITE Board:
15941613
set i to 0
15951614
REPEAT 16:
15961615
set v to item (i + 1) of grid
1597-
IF v > 0 THEN:
1598-
set r to floor of (i / 4)
1599-
set c to i mod 4
1600-
set color effect to v mod 200
1601-
go to x: (-90) + (c * 60) y: (90) - (r * 60)
1602-
stamp
1616+
set r to floor of (i / 4)
1617+
set c to i mod 4
1618+
IF v = 0 THEN:
1619+
switch costume to blank
1620+
ELSE:
1621+
switch costume to ("t" join v)
1622+
go to x: (-120) + (c * 80) y: (120) - (r * 80)
1623+
stamp
16031624
change i by 1
16041625
16051626
DEFINE move left:
@@ -1644,8 +1665,8 @@ SPRITE Board:
16441665
16451666
WHEN flag clicked:
16461667
show variable score
1647-
set size to 52
1648-
show
1668+
set size to 100
1669+
hide
16491670
reset
16501671
render
16511672

0 commit comments

Comments
 (0)