Skip to content

Der0217/WolfSheepFarm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

這個專案是基於 Python 的 Tkinter 庫實現的互動式遊戲,名為「狼、羊和菜」。玩家需要控制農夫將狼、羊和蔬菜安全地渡過河流,避免羊被狼吃掉或讓羊吃掉蔬菜。遊戲的主要目標是確保所有角色在安全的狀態下到達對岸。

在遊戲中,玩家可以選擇狼、羊或蔬菜讓農夫搭船,並將選定的角色移動到對岸。遊戲邏輯會檢查當狼和羊在同一側時,羊會被吃掉;而當羊和蔬菜在同一側時,羊則會吃掉蔬菜。每次角色移動後,遊戲會判斷是否獲勝或失敗,並顯示相應的訊息。

This project is an interactive game based on Python's Tkinter library, titled "Wolf, Sheep, and Cabbage." Players must control the farmer to safely transport the wolf, sheep, and cabbage across the river, avoiding scenarios where the sheep gets eaten by the wolf or the sheep eats the cabbage. The main objective of the game is to ensure that all characters reach the opposite shore in a safe state.

In the game, players can choose the wolf, sheep, or cabbage for the farmer to take across the river, moving the selected character to the other side. The game logic checks that when the wolf and sheep are on the same side, the sheep will be eaten; conversely, when the sheep and cabbage are on the same side, the sheep will eat the cabbage. After each character move, the game determines whether the player has won or lost and displays the corresponding message.

About

Just a simple game. Made with Tkinter.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages