Skip to content

boyasa/GameServer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GameServer 命令行玩家背包

项目目标

实现一个简单的命令行玩家背包,支持添加、查询、移除物品。

运行方式

go run .

支持的命令

help add <数量> <名称> get list remove <数量> quit

业务规则

数量必须大于 0 重复添加会累加 删除数量不能超过库存 数量减到 0 时删除物品 list 按 ID 排序

验证命令

go fmt ./... go vet ./... go test -count=1 ./...

项目结构

main.go inventory.go player.go main_test.go

当前限制

单玩家 只保存在内存中 程序退出后数据丢失

About

A Go command-line player inventory project with validation and tests.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages