Pseudo-Code


  • For sprint occurrence
  • For thread loop closure
    • Check for minotaur in loop, send back to entrance
  • For item use
    • Type of item
    • Change of player or minotaur speed
  • For board clear
    • Reset board with slightly higher speeds 
    • Both for the player and the minotaur (need faster reaction times)

program character {

               if alive = TRUE do            

set character_speed = 2 + c_boost           

set minotaur_speed = 3 + m_boost

               if alive = FALSE do

                              print “game over”

                              set character_position = c_start

                              set minotaur_position = m_start

                              set num_boost = 0

                              set boost = 0

                              set counter = 0

                              set alive = TRUE

}

program dead {

if minotaur_position = character_position do

                              set alive = FALSE

}

program pickup {

if boost_position = character_position do

                              set num_boost = num_boost + 1

}

program character_sprint {

               if button_pressed & num_boost > 0 do

                              set c_boost = 2

                              num_boost = num_boost – 1

               else do

                              set c_boost = 0

}

program thread {

               for loop counter 0 to 30 seconds do

fill a 2D array with character position

//will overwrite old array values after 30 sec – thread will disappear

                              if current array value = any old array value do

                                             if minotaur_position is within the area created by the array values do

                                                            set minotaur_position = m_start

                                             clear old array

}

program minotaur_sprint {

               for loop counter 0 to 17 seconds do

                              if counter = 15 do

                                             set m_boost = 2

                              else if counter = 17 do

                                             set counter = 0

set m_boost = 0

}


Leave a Reply

Your email address will not be published. Required fields are marked *