java.util.HashSet allowed?

I am implementing the TetrisGame interface and want to implement some attribute that saves the information, which observers has been added. Are we allowed to import and use such things as java.util.Set or java.util.HashSet or should we implement them ourselves?

Yes, java.util classes like HashSet are allowed.

1 Like

In general, you can use all classes from the Java standard library that are not explicitly forbidden (i.e. Uri in the last project) as long as your project still compiles on the server.

Note that Reflection or anything that can be used to unduely access, leak or modify the tests/test results is forbidden, of course. Similarly, you may not “reflect” yourself into the Tetris AI judge to get more information about the game state than is provided by the API. Both of these will be considered attempts at deception (Täuschungsversuch) and be treated accordingly.