hpi-swa-teaching / GameMecha

A library providing implementations for common patterns in Squeak/Smalltalk game development.
MIT License
12 stars 2 forks source link

add simple collision [7] #32

Closed NiklasKoehnecke closed 6 years ago

NiklasKoehnecke commented 6 years ago

Story

As a SWA student I want to request whether my morphs that i used in my game collide with each other.

Description

  1. Why: collision is a big part of many games in SWA. Creating Methods that handle this might make the development of more complex games possible.
  2. What:
    • [x] morph can test whether it collides with another morph (and which one)
    • [x] morph can request a collection containing all morphs he is colliding with
    • [x] tests are written which ensure that collision doesnt break
benrobby commented 6 years ago

estimation: 7

Tobias314 commented 6 years ago

What is the difference between checkbox 1 and checkbox 2? We get a Collection of all morphs we are colliding with, this includes the fact whether we are colliding with a morph (list is not empty) or not (list ist empty).

arthurz0 commented 6 years ago

checkbox 1 is about testing whether you are colliding with a specific morph. Like in CollisionHandler >> is: aMorph collidingWith: anotherMorph

ekrebs5 commented 6 years ago

accepted