Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix as highlighted by #2. #3

Merged
merged 7 commits into from
Aug 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/cargo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Cargo (full)

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
CARGO_TERM_COLOR: always

jobs:
build:
runs-on: ubuntu-latest
container:
image: aalekhpatel07/rust:1.0
options: --user root --security-opt seccomp=unconfined
steps:
- name: Checkout repository.
uses: actions/checkout@v3
- name: Run tests
run: cargo nextest run --release --verbose
- name: Generate test coverage report.
run: cargo tarpaulin -o Html --output-dir ./target/tarpaulin
- name: Run clippy
run: cargo clippy --no-deps --fix
- name: Build the project.
run: |
cargo build --release
- name: Archive production build.
uses: actions/upload-artifact@v3
with:
name: production-static-files
path: |
target/release/tic-tac-toe
- name: Archive code coverage results.
uses: actions/upload-artifact@v3
with:
name: test-coverage-report
path: |
target/tarpaulin
24 changes: 0 additions & 24 deletions .github/workflows/rust.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.idea/
target
.vscode/
276 changes: 275 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 14 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "minimax-alpha-beta"
version = "0.1.7"
version = "0.2.0"
authors = ["Aalekh Patel <[email protected]>"]
edition = "2018"
license = "MIT"
Expand All @@ -14,8 +14,20 @@ categories = ["algorithms", "mathematics"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
[features]
default = ["tictactoe"]
tictactoe = []
chess = ["dep:shakmaty"]

[dependencies]
shakmaty = { version = "0.21.3", optional = true }
anyhow = { version = "1.0.59" }
clap = { version = "3.2.16", features = ["derive"]}

[profile.release]
lto = "fat"
debug = false

[[bin]]
name = "tic-tac-toe"
path = "src/main.rs"
2 changes: 2 additions & 0 deletions src/drivers/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
mod tic_tac_toe;
pub use tic_tac_toe::*;
Loading