-
Game was written as a course project in TalTech in Autumn 2024
-
Can be played from Console and Web
-
Web is done via
Razor Pages
-
It supports
custom configs
that can be added/edited in both Console and Web UI -
App supports both
JSON
andDatabase
ways of storaging users configurations and games. -
JSON
andDatabase
are separate, so swapping from one to another doesn't transfer data between them -
Game has a relatively smart AI and three different game modes:
Player vs Player
Player vs AI
AI vs AI
-
To swap from
JSON
toDatabase
or vice versa all that you need to do is comment and uncomment corresponding lines inprogram.cs
file
For ConsoleAppprogram.cs
:
var configRepository = new ConfigRepositoryJson();
var gameRepository = new GameRepositoryJson();
// var dbContext = new AppDbContextFactory().CreateDbContext([]);
//
// var configRepository = new ConfigRepositoryDb(dbContext);
// var gameRepository = new GameRepositoryDb(dbContext);
For WebAppprogram.cs
:
// connectionString = connectionString.Replace("<%location%>", FileHelper.BasePath);
//
// builder.Services.AddDbContext<AppDbContext>(options =>
// options.UseSqlite(connectionString));
builder.Services.AddScoped<IConfigRepository, ConfigRepositoryJson>();
builder.Services.AddScoped<IGameRepository, GameRepositoryJson>();
builder.Services.AddScoped<IUserRepository, UserRepositoryJson>();
// builder.Services.AddScoped<IConfigRepository, ConfigRepositoryDb>();
// builder.Services.AddScoped<IGameRepository, GameRepositoryDb>();
// builder.Services.AddScoped<IUserRepository, UserRepositoryDb>();
-
Notifications
You must be signed in to change notification settings - Fork 0
jeuzee/tic-tac-two
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Tic-tac-two game in console and web
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published