Skip to content

D4nnyLee/Throwing-Eggs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Throwing Eggs

Introduction

This is a django-based line bot that provide a little game to play.

Scenario

Now you have 3 eggs, I want to know the MAX number X such that the egg won't break if I throw it from Xth floor of the building.

The range for X is 0 ~ 1000.

Note that if the egg is not broken, it will be thrown again in the next trial.

Please help me to find the number X within at most 30 trials.

Usage

Different input has different function.

  • # : Get the information of remain throwing times and eggs.
  • ? N : Query the result of throwing egg from Nth floor.
  • ! N : Check whether N is the answer or not and restart game.

FSM diagram

Reference

  1. Django documentation
  2. Line Message API reference

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published