herohjk
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # 4그룹 1주차 ## 개인별 브랜치 [호종](https://github.com/code-squad/swift-chess-app/tree/HOJONG) [Jake](https://github.com/code-squad/swift-chess-app/tree/ChocOZerO) [윤재영](https://github.com/code-squad/swift-chess-app/tree/jaeyoungyun) [김척척](https://github.com/code-squad/swift-chess-app/tree/chuckchuck333) ## 개인별 설계 의도 * 호종 * 최대한 세밀하게 분리 * Command <-> Chess Board에서의 포지션을 변환하는 함수들을 작성하여 Chess Board에서는 Rank, File을 활용 * 윤재영 * Board와 Piece 프로토콜로 구현에 필요한 사항을 정의 * Board는 보드판과 기물들의 위치를 관리 * Piece는 기물의 고유 특성을 관리 * Jake * Piece가 Board를 알지 못하도록 Piece와 Board의 의존관계를 정의함 * Board는 Piece들의 배치와 움직임을 관리 * Piece는 color, type, image를 책임짐 * 김척척 * X ## 개인별 구현 방식 * 호종 * ChessBoard는 Unit Protocol을 가진 2차원 배열로 구현 * Score는 배열에서 합산하여 계산하도록 구현 * 테스트는 클래스당 함수 하나로 분리하지 못함 * Chess를 전체적으로 컨트롤하는 부분은 아직 구현하지 않음. * 윤재영 * Board 프로토콜을 상속한 ChessBoard 클래스 구현 * Piece 프로토콜을 상속한 Pawn 클래스 구현 * 2차원 배열로 보드판과 기물들의 위치정보를 구현 * 2차원 배열의 index를 통해서 기물 움직임 구현 * Jake * Piece는 color, type, image를 갖는다. * type별로 점수가 다를 수 있다. * 현재 위치에서 갈 수 있는 모든 경우의 수를 추출하는 distances() 함수가 있다. 대각선과 직선은 가장 멀리갈 수 있는 경우를 가정. * Board는 board, score, display, move 등의 함수로 게임 플레이와 연관된 기능들을 제공. * 행렬을 보기 좋게 정리하다보니 Board[Rank][File] 방식으로 배치했으며, position은 익숙한 (x, y) 좌표로 감지하기 위해 (File, Rank) 방식을 취함. * 김척척 * X ## 질의 응답 항목과 시간들 * Command 변환 검사 * 모든 상황을 검사했는지? * 위치를 저장하는 경우가 중복일때는 어떻게 했는가? * 이동 가능 함수를 두개로 분리한 이유가 있는지? * 스코어 구현을 어떻게 했는지? * 테스트 함수 이름을 한글로 한 이유? --- # 4그룹 2주차 ## 개인별 브랜치 [호종](https://github.com/code-squad/swift-chess-app/tree/HOJONG) [Jake](https://github.com/code-squad/swift-chess-app/tree/ChocOZerO) [윤재영](https://github.com/code-squad/swift-chess-app/tree/jaeyoungyun) [김척척](https://github.com/code-squad/swift-chess-app/tree/chuckchuck333) ## 개인별 설계 의도 * 호종 * 야근 ㅠ * 윤재영 * 1주차 때 체스판의 rank와 file을 다루는 부분이 Int(체스판의 index)를 직접 사용하게 설계하여 범위 제한 검증과 이동 로직이 복잡하여 이를 개선하고자 하였습니다. * rank와 file을 타입으로 추상화하여 복잡한 로직을 분리하고자 하였습니다. * Jake * Game과 Player를 구분하여, Game이 생성되면 두 플레이어(black, white)가 생성된다. * Game이 생성됨과 동시에 Board가 새로 초기화되어 플레이를 진행할 수 있다. * 기존에 enum으로 처리되던 Piece를 protocol과 struct 구현체로 구분하여 각 Piece 종류별로 대응한다. * 김척척 * x ## 개인별 구현 방식 * 호종 * 야근 ㅠ * 윤재영 * Rank와 File을 enum 타입으로 정의하여 Int로 계산하던 복잡한 구현을 숨기고자 하였습니다. * Rank와 File을 가지는 Position 객체를 정의해 체스말의 위치에 대한 로직을 Position에서 담당하게 하였습니다. * Piece 프로토콜을 구현하는 다른 체스말 타입들을 정의하였습니다. * Jake * 신규 * Game의 역할: player에게 턴을 넘겨주며, input string 을 받는다. * Player의 역할: board에서 자신의 말을 이동한다. * 개선 * Board가 이중배열이 아닌 포지션을 키로 갖는 딕셔너리 형태로 변경되어 위치에 바로 접근이 용이하도록 변경 * 확장 * Piece를 enum 에서 protocol과 struct로 구현하여 각 구체인스턴스에 맞는 액션을 취하도록 수정하고, King을 제외한 Piece들 정의 * 김척척 * x ## 질의 응답 항목과 시간들 * Move에 대한 프로토콜을 나눈 이유 * 이동 연산을 어떻게 처리하였는가? * WhitePlayer와 BlackPlayer를 나눈 이유 * 체스판 초기화에 대한 하드코딩 해결 방법 * 다형성을 하려면 어떻게 해야 하는가 * 지난 주차와 달라진 점은 어떤 부분인가 * 테스트는 어떤 식으로 작성하는가(화이트 박스/ 블랙 박스) * 재영 - 장애물이 있을 경우를 대비하지 못하여 이 부분 처리에 대한 논의 * Jake - 플레이어의 역할 확장 * Jake - Piece가 위치를 알아야 움직일 수 있는 위치를 계산하는데 이 위치가 Board에 종속되어 있어 이를 어떻게 분리할 수 있을까?

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully