Knowledge Base

Get Score Block

output-onlinepngtools__231_.png  This block works for both EV3 Robot and Ruby Robot!  output-onlinepngtools__101_.png

 

 It’s time to talk strategy! 

 mceclip1.png

Strategy is a very important part of planning how to write your code. This is why it’s time we learn how to work with a block that will help us achieve each mission’s goal.

The Get Score Block is a block which indicates the amount of points the robot has collected.

If for example, a mission has a minimum amount of points needed to pass but a limited timeframe, using this block in our code will allow us to move on to the target the moment we have collected that minimum amount, thus saving time and completing the mission within the time limit.

This way we can choose the course of action which will give us the highest amount of points in the shortest amount of time.

We’re sure that you are talented and imaginative programmers, and will find more smart ways to utilize this block.

 

 Example code:

Inside an If block, the program checks if the current score is lower than 100 points. If it is, the robot will drive forward.

mceclip0.png

 

Was this article helpful?
0 out of 0 found this helpful

Comments

Please sign in to leave a comment.

Powered by Zendesk