# 2025q1 Homework3 (kxo) contributed by <`Ian-Yen`> {%hackmd NrmQUGbRQWemgwPfhzXj6g %} ## 可以暫停 在 `raw mode` 如果沒有加上這行, `Ctrl + P` 偵測 有可能會被 終端的內建控制機制干擾 ```c raw.c_iflag &= ~IXON; ``` > Commit [`92321b5`](https://github.com/sysprog21/kxo/commit/92321b567df479602da51b14db85bc6d90128bc2) ## 把draw_board搬到user space 把原本放在 `main.c` 的 `draw_board` 放到 `xo-user.c` 並簡化程式碼。有效降低傳輸成本。 > Commit [`64388a3`](https://github.com/sysprog21/kxo/commit/64388a31640085a6e755e6756f66279565f5a95f) ## 顯示時間 使用 `time.h` 標頭檔中的 ```c time(&current_time); time_info = localtime(&current_time); ``` 來獲取當下時間,並輸出。 > Commit [`21cfd6d`](https://github.com/sysprog21/kxo/commit/21cfd6dfb6057e5bcbf097226a9b266f02d8a7b7) ## 顯示紀錄 在 `main.c` 中,每次移動與更新棋盤都用 `record.c` 中的函式去紀錄,並在需要輸出的時候,使用 `ioctl` 的方式,傳給 `user` 端,並將他列印。 > Commit [`50be005`](https://github.com/sysprog21/kxo/commit/50be0051871114b979d30acd7df2b6844436f06e) > Commit [`72777e7`](https://github.com/sysprog21/kxo/commit/72777e7ef0f99d5afa4dd606c800865c920abf3a) :::danger 說好的進度呢? :::