From 0130a7753eaf80c0c48e5a97d05431546aa69a30 Mon Sep 17 00:00:00 2001 From: Ron Hale-Evans Date: Wed, 15 Jun 2016 14:14:15 -0700 Subject: [PATCH] Rewrote in simple language. Streamlined. Added cross-refs. --- docs/reference/game/change-score-by.md | 28 ++++++++++++-------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/docs/reference/game/change-score-by.md b/docs/reference/game/change-score-by.md index 19c5f3e0..ae8c5a83 100644 --- a/docs/reference/game/change-score-by.md +++ b/docs/reference/game/change-score-by.md @@ -1,6 +1,16 @@ # Change Score By -The code below shows a simple game where the user gets to press the button ``A`` as much times as possible and the score will display on the screen. +Add the amount you say to the score for the game. + +```sig +game.addScore(1) +``` + +### Examples + +This program is a simple game. +Press button ``A`` as much as possible. +At the end of 10 seconds, the program will show your score. ```blocks input.onButtonPressed(Button.A, () => { @@ -9,18 +19,6 @@ input.onButtonPressed(Button.A, () => { game.startCountdown(10000) ``` -### Score +### See Also -When a player achieves a goal, you can increase the game score - -* add score points to the current score - -``` -export function addScore(points: number) -``` - -* get the current score value - -``` -export function score() : number -``` +[score](/reference/game/score), [start countdown](/reference/game/start-countdown)