GithubHelp home page GithubHelp logo

2018-2-oss-l6's Introduction

Jekyll template

Light and beautiful blog style template for jekyll

Gitter Twitter

preview

Demo

Find a demo here

Contributing

  1. Clone the repo
  2. Checkout the dev branch ( Do not work directly on master )
  3. Use jekyll serve to run the project
  4. Make your changes and test
  5. Submit a pull request

2018-2-oss-l6's People

Contributors

junhyeonmoon avatar junsix avatar kevhahn97 avatar rjsgmlsms126 avatar yuneg11 avatar

Watchers

 avatar  avatar  avatar  avatar

2018-2-oss-l6's Issues

String.ko-KR.resx 번역이 필요한부분 정리

번역이 되지 않은 부분을 정리했습니다.

  • Line 2707 ~ 2719

    <value>Paste behavior</value>
    </data>
    <data name="Options_Tracker_Importing_Label_Tooltip_PasteBehavior" xml:space="preserve">
    <value>Behavior when pasting (ctrl-v) a url or deck object into HDT</value>
    </data>
    <data name="Enum_ImportingChoice_Manual" xml:space="preserve">
    <value>수동</value>
    </data>
    <data name="Enum_ImportingChoice_SaveLocal" xml:space="preserve">
    <value>Save only</value>
    </data>
    <data name="Enum_ImportingChoice_ExportToHs" xml:space="preserve">
    <value>Create in Hearthstone</value>

  • Line 2751 ~ 2762

    <data name="Enum_ConfigWarning_AutoDeckDetection" xml:space="preserve">
    <value>Automatic deck selection is currently disabled.\n\nIt's recommended to enable this setting for HDT to work best.</value>
    </data>
    <data name="Enum_ConfigWarning_ConstructedAutoImportNew" xml:space="preserve">
    <value>Automatic importing of new Constructed decks is currently disabled.\n\nIt's recommended to enable this setting for HDT to work best.</value>
    </data>
    <data name="Enum_ConfigWarning_ConstructedAutoUpdate" xml:space="preserve">
    <value>Automatic importing of changes to Constructed decks is currently disabled.\n\nIt's recommended to enable this setting for HDT to work best.</value>
    </data>
    <data name="Enum_ConfigWarning_SelectedArenaImportingBehaviour" xml:space="preserve">
    <value>Automatic importing of Arena decks is currently disabled.\n\nIt's recommended to enable this setting for HDT to work best.</value>
    </data>

  • Line 2766 ~ 2786

    <data name="Options_Overlay_General_CheckBox_CardMarkTooltips_Tooltip" xml:space="preserve">
    <value>Displays the created/returned card, if the information is available.</value>
    </data>
    <data name="Options_Overlay_General_CheckBox_FlavorText_Tooltip" xml:space="preserve">
    <value>Will only appear if the cursor stays still on a card for a short period of time.</value>
    </data>
    <data name="Options_Overlay_General_CheckBox_BatteryStatus_Tooltip" xml:space="preserve">
    <value>Works for mobile devices (Laptop, Tablet, ...) only.</value>
    </data>
    <data name="Options_Overlay_Opponent_CheckBox_CenterVertically_Tooltip" xml:space="preserve">
    <value>Center cards and information panels vertically within the selected region for the deck. Region can be changed via 'overlay &gt; general &gt; unlock'.</value>
    </data>
    <data name="Options_Overlay_Player_CheckBox_CenterVertically_Tooltip" xml:space="preserve">
    <value>Center cards and information panels vertically within the selected region for the deck. Region can be changed via 'overlay &gt; general &gt; unlock'.</value>
    </data>
    <data name="Options_Tracker_Appearance_CheckBox_Metro_Tooltip" xml:space="preserve">
    <value>Uncheck to disable most animations for popup dialogs and flyouts</value>
    </data>
    <data name="Options_Tracker_Exporting_CheckBox_Clipbard_Tooltip" xml:space="preserve">
    <value>Try this if you have problems exporting certain card/deck names - May not work with all keyboard layouts</value>
    </data>

  • Line 2793 ~ 2798

    <data name="Options_Tracker_General_Label_TimerAlert_Tooltip" xml:space="preserve">
    <value>Sound an alert and flash when you have "X" seconds remaining</value>
    </data>
    <data name="Options_Tracker_General_CheckBox_UpperCaseDeckNames_Tooltip" xml:space="preserve">
    <value>Uncheck to use normal case in Deck Picker.</value>
    </data>

  • Line 2802 ~ 2804

    <data name="Options_Tracker_Importing_Label_ArenaTemplatesFormat_Tooltip" xml:space="preserve">
    <value>For more information on date formats google "C# date format".</value>
    </data>

번역이 안 된 부분 번역 2

<data name="Enum_ConfigWarning_AutoDeckDetection" xml:space="preserve">
<value>Automatic deck selection is currently disabled.\n\nIt's recommended to enable this setting for HDT to work best.</value>
</data>
<data name="Enum_ConfigWarning_ConstructedAutoImportNew" xml:space="preserve">
<value>Automatic importing of new Constructed decks is currently disabled.\n\nIt's recommended to enable this setting for HDT to work best.</value>
</data>
<data name="Enum_ConfigWarning_ConstructedAutoUpdate" xml:space="preserve">
<value>Automatic importing of changes to Constructed decks is currently disabled.\n\nIt's recommended to enable this setting for HDT to work best.</value>
</data>
<data name="Enum_ConfigWarning_SelectedArenaImportingBehaviour" xml:space="preserve">
<value>Automatic importing of Arena decks is currently disabled.\n\nIt's recommended to enable this setting for HDT to work best.</value>
</data>
<data name="Options_Tracker_General_CheckBox_AutoDeckDetection" xml:space="preserve">
<value>자동으로 덱을 선택 (추천)</value>
</data>
<data name="Options_Overlay_General_CheckBox_CardMarkTooltips_Tooltip" xml:space="preserve">
<value>Displays the created/returned card, if the information is available.</value>
</data>
<data name="Options_Overlay_General_CheckBox_FlavorText_Tooltip" xml:space="preserve">
<value>Will only appear if the cursor stays still on a card for a short period of time.</value>
</data>
<data name="Options_Overlay_General_CheckBox_BatteryStatus_Tooltip" xml:space="preserve">
<value>Works for mobile devices (Laptop, Tablet, ...) only.</value>
</data>
<data name="Options_Overlay_Opponent_CheckBox_CenterVertically_Tooltip" xml:space="preserve">
<value>Center cards and information panels vertically within the selected region for the deck. Region can be changed via 'overlay &gt; general &gt; unlock'.</value>
</data>
<data name="Options_Overlay_Player_CheckBox_CenterVertically_Tooltip" xml:space="preserve">
<value>Center cards and information panels vertically within the selected region for the deck. Region can be changed via 'overlay &gt; general &gt; unlock'.</value>
</data>
<data name="Options_Tracker_Appearance_CheckBox_Metro_Tooltip" xml:space="preserve">
<value>Uncheck to disable most animations for popup dialogs and flyouts</value>
</data>
<data name="Options_Tracker_Exporting_CheckBox_Clipbard_Tooltip" xml:space="preserve">
<value>Try this if you have problems exporting certain card/deck names - May not work with all keyboard layouts</value>
</data>
<data name="Options_Tracker_General_Label_TimerAlert" xml:space="preserve">
<value> </value>
</data>
<data name="Options_Tracker_General_Label_TimerAlert2" xml:space="preserve">
<value>초가 지나면 경고하기</value>
</data>
<data name="Options_Tracker_General_Label_TimerAlert_Tooltip" xml:space="preserve">
<value>Sound an alert and flash when you have "X" seconds remaining</value>
</data>
<data name="Options_Tracker_General_CheckBox_UpperCaseDeckNames_Tooltip" xml:space="preserve">
<value>Uncheck to use normal case in Deck Picker.</value>
</data>
<data name="Options_Tracker_Settings_CheckBox_AdvancedWindowSearch_Tooltip" xml:space="preserve">
<value>하스스톤이 아닌 창에 오버레이가 나타나면 이 기능을 끌 수 있습니다.</value>
</data>
<data name="Options_Tracker_Importing_Label_ArenaTemplatesFormat_Tooltip" xml:space="preserve">
<value>For more information on date formats google "C# date format".</value>
</data>

번역이 필요한 부분확인

Bug report

Actual Behavior

1.외래어 표기
2.잘못된 번역
3.잘못된 번역

Steps to reproduce behavior

1.최근 다시보기
2.다시보기 통계
3.다시보기 파일

Log/Screenshots

  <data name="MainWindow_Menu_Replays_Latest" xml:space="preserve">
    <value>최근 리플레이(_L)</value>
  </data>
  <data name="MainWindow_Menu_Replays_Stats" xml:space="preserve">
    <value>통계에서 선택(_S)</value>
  </data>
  <data name="MainWindow_Menu_Replays_File" xml:space="preserve">
    <value>파일로부터 로드(_F)</value>
  </data>


설정변경시 재시작 문제

프로그램의 설정을 변경한 후 재시작이 필요한 부분이 있음(언어변경 등)
하지만 지금 재시작을 할려면 프로그램을 직접 껐다가 켜야함

image

이런식으로 버튼 추가
image

issue #33, 34에 관해

issue #33, #34에서 다룬 코드 리뷰에서 commit 메시지 항목이 통과되지 못했는데, commit 메시지를 수정하고자 rebase를 하게 되면 commit 번호가 바뀌기 때문에 일단 그냥 진행하는 것으로 하려고 합니다. 매 commit 전에 commit 메세지에 대해 심사숙고해 주시면 감사하겠습니다.
의견 남겨주시면 감사하겠습니다.

유닛테스트 추가 @junsix

폭발의 덫에 의해 하수인이 죽을때 빙결의 덫이 덫 리스트에서 지워지지 않는 테스트 추가.

함수 네이밍 추천 부탁드립니다.

코드 리뷰 74cdd08

74cdd08 커밋에 대한 코드 리뷰

if(attacker.IsMinion)
{
Log.Info("attacker.Health: " + attacker.Health);
exclude.Add(Mage.Vaporize);
if(attacker.Health >= 1)
exclude.Add(Hunter.FreezingTrap);
}

  • 코딩 컨벤션: 적절한 것 같습니다.
  • 커밋 컨벤션: 커밋 메시지가 너무 간단합니다. 어느 부분을 고쳤는지에 대한 간단한 설명이 있으면 좋을 것 같습니다.
  • 코드 테스트: 수정한 부분이 잘 작동하는 것 같습니다.

번역이 안 된 부분 번역 4

  • Line 2707 ~ 2719
    <value>Paste behavior</value>
    </data>
    <data name="Options_Tracker_Importing_Label_Tooltip_PasteBehavior" xml:space="preserve">
    <value>Behavior when pasting (ctrl-v) a url or deck object into HDT</value>
    </data>
    <data name="Enum_ImportingChoice_Manual" xml:space="preserve">
    <value>수동</value>
    </data>
    <data name="Enum_ImportingChoice_SaveLocal" xml:space="preserve">
    <value>Save only</value>
    </data>
    <data name="Enum_ImportingChoice_ExportToHs" xml:space="preserve">
    <value>Create in Hearthstone</value>

코드 리뷰 0682101

0682101 커밋에 대한 코드 리뷰

[TestMethod]
public void SingleSecret_MinionToHero_PlayerAttackTest()
{
_playerMinion1.SetTag(GameTag.ZONE, (int)Zone.PLAY);
_game.SecretsManager.HandleAttack(_playerMinion1, _heroOpponent);
/*VerifySecrets(0, HunterSecrets.All, HunterSecrets.BearTrap, HunterSecrets.ExplosiveTrap,
HunterSecrets.FreezingTrap, HunterSecrets.Misdirection, HunterSecrets.WanderingMonster);*/
VerifySecrets(1, MageSecrets.All, MageSecrets.IceBarrier, MageSecrets.Vaporize);
VerifySecrets(2, PaladinSecrets.All, PaladinSecrets.NobleSacrifice);
VerifySecrets(3, RogueSecrets.All);
_playerMinion2.SetTag(GameTag.ZONE, (int)Zone.PLAY);
_game.SecretsManager.HandleAttack(_playerMinion1, _heroOpponent);
/*VerifySecrets(0, HunterSecrets.All, HunterSecrets.BearTrap, HunterSecrets.ExplosiveTrap,
HunterSecrets.FreezingTrap, HunterSecrets.Misdirection, HunterSecrets.WanderingMonster);*/
VerifySecrets(1, MageSecrets.All, MageSecrets.IceBarrier, MageSecrets.Vaporize);
VerifySecrets(2, PaladinSecrets.All, PaladinSecrets.NobleSacrifice);
VerifySecrets(3, RogueSecrets.All, RogueSecrets.SuddenBetrayal);
}

  • 커밋 컨벤션: unit_test 브랜치에서 master 브랜치로 merge하는 과정에서 중복된 커밋이 생긴 것 같습니다.

issue 재현 @JunhyeonMoon @Junsix

Bug report

폭발의 덫/ 빙결의 덫 순서로 비밀이 걸려 있을때 폭발이 덫이 빠지면서 하수인이 죽어서 빙결의 덫이 발동하지 않는 경우에 빙결의 덫도 목록에 지워 버림.

Expected Behavior

빙결의 덫이 발동하지 않는 경우 비밀 리스트에서 사라지면 안됨.

Actual Behavior

Steps to reproduce behavior

Log/Screenshots

_
_
_

버그 수정 코드 작성 @junsix

image

https://hearthstone.gamepedia.com/Advanced_rulebook#Combat 에 있는
"If you play Explosive Trap then Freezing Trap, your enemy's Novice Engineer attacking into it will trigger the Explosive Trap and be reduced to -1 Health. The Freezing Trap is a hindering Secret and thus aborts having no target it considers valid.[30] "
을 보면 하수인이 폭발의 덫에 죽는 경우 빙결의 덫이 발생하지 않음.

따라서 하수인의 체력이 1이상인 경우에만 빙결의 덫이 덫 목록에서 제거 되도록 코드 추가.

Commit 메세지 관련

master branch에서
"Update Strings.ko-KR.resx"
라는 커밋 메세지로 커밋된 게 3개정도 있는데, 커밋 메세지에 어떤 업데이트가 있었는지 추가 정보가 있어야 할 것 같은데 어떻게 생각하시나요?

프로젝트 코드 분석 @junsix

좌측에 보인의 덱을 띄워주는 로직 :

  1. Hearthstone Deck Tracker/LogReader에서 게임 내의 로그를 파싱한 후 분석
  2. 카드가 새로 생성되는 로그 정보가 나온 경우 Hearthstone Deck Tracker/LogReader/Handlers/PowerHandler.cs 에서 game.Entities 객체 안에 해당 카드의 정보를 넣음.

else if(CreationRegex.IsMatch(logLine))
{
var match = CreationRegex.Match(logLine);
var id = int.Parse(match.Groups["id"].Value);
var cardId = match.Groups["cardId"].Value;
var zone = GameTagHelper.ParseEnum<Zone>(match.Groups["zone"].Value);
if(!game.Entities.ContainsKey(id))
{
if(string.IsNullOrEmpty(cardId) && zone != Zone.SETASIDE)
{
var blockId = gameState.CurrentBlock?.Id;
if(blockId.HasValue && gameState.KnownCardIds.ContainsKey(blockId.Value))
{
cardId = gameState.KnownCardIds[blockId.Value].FirstOrDefault();
if(!string.IsNullOrEmpty(cardId))
{
Log.Info($"Found known cardId for entity {id}: {cardId}");
gameState.KnownCardIds[blockId.Value].Remove(cardId);
}
}
}
game.Entities.Add(id, new Entity(id) {CardId = cardId});
}
gameState.SetCurrentEntity(id);
if(gameState.DeterminedPlayers)
_tagChangeHandler.InvokeQueuedActions(game);
gameState.CurrentEntityHasCardId = !string.IsNullOrEmpty(cardId);
gameState.CurrentEntityZone = zone;
return;
}

새로운 카드를 생성할 때마다 game.Entities 에 카드 정보를 업데이트함.

번역이 안 된 부분 번역 1

<data name="Options_Tracker_Settings_CheckBox_CloseToTray" xml:space="preserve">
<value>Close to tray</value>
</data>
<data name="Enum_HsActionType_None" xml:space="preserve">
<value>None</value>
</data>
<data name="Enum_HsActionType_Flash" xml:space="preserve">
<value>Flash</value>
</data>
<data name="Enum_HsActionType_Popup" xml:space="preserve">
<value>Popup</value>
</data>
<data name="Options_Tracker_Notifications_Label_TurnStart" xml:space="preserve">
<value>On turn start:</value>
</data>
<data name="Options_Tracker_Notifications_Label_FriendlyChallenge" xml:space="preserve">
<value>On friendly challenge:</value>
</data>
<data name="DeckSetIcons_Tooltip_Boomsday" xml:space="preserve">
<value>Deck contains cards from The Boomsday Project expansion.</value>
</data>

해당 부분이 아직 번역되지 않았습니다.

번역이 안 된 부분 번역 3

<data name="WebImportingDialog_Title" xml:space="preserve">
<value>Import from web</value>
</data>
<data name="WebImportingDialog_Label_EnterUrl" xml:space="preserve">
<value>Enter deck URL:</value>
</data>
<data name="WebImportingDialog_Hyperlink_AllWebsites" xml:space="preserve">
<value>Find all supported websites</value>
</data>
<data name="WebImportingDialog_Button_Import" xml:space="preserve">
<value>Import</value>
</data>
<data name="WebImportingDialog_Button_Cancel" xml:space="preserve">
<value>Cancel</value>
</data>
<data name="MainWindow_Flyout_DeckScreenshot_Header" xml:space="preserve">
<value>스크린샷</value>
</data>
<data name="DeckScreenshot_Label_CardsOnly" xml:space="preserve">
<value>Cards only</value>
</data>
<data name="DeckScreenshot_Label_Title" xml:space="preserve">
<value>Title:</value>
</data>

코드 리뷰 eef234d

eef234d 커밋에 대한 코드 리뷰

if(attacker.IsMinion)
{
exclude.Add(Mage.Vaporize);
if(attacker.Health >= 1)
exclude.Add(Hunter.FreezingTrap);
}

  • 코딩 컨벤션: 적절한 것 같습니다.
  • 커밋 컨벤션: 커밋 메시지가 너무 긴 것 같습니다. 이슈 이름을 그대로 적을 필요는 없을 것 같습니다.
  • 코드 테스트: 수정한 부분이 잘 작동하는 것 같습니다.

issue 재현 @junsix @yuneg11

테스트 이름: SingleSecret_MinionToHero_PlayerAttackTest
테스트 전체 이름: HDTTests.Hearthstone.Secrets.SecretEventHandlerTest.SingleSecret_MinionToHero_PlayerAttackTest
테스트 소스: C:\Users\home\Desktop\hs\Hearthstone-Deck-Tracker\HDTTests\Hearthstone\Secrets\SecretEventHandlerTest.cs : 줄 170
테스트 결과: 실패
테스트 지속 시간: 0:00:00.0020667

Result StackTrace:
위치: HDTTests.Hearthstone.Secrets.SecretEventHandlerTest.VerifySecrets(Int32 index, List`1 allSecrets, String[] triggered) 파일 C:\Users\home\Desktop\hs\Hearthstone-Deck-Tracker\HDTTests\Hearthstone\Secrets\SecretEventHandlerTest.cs:줄 420
위치: HDTTests.Hearthstone.Secrets.SecretEventHandlerTest.SingleSecret_MinionToHero_PlayerAttackTest() 파일 C:\Users\home\Desktop\hs\Hearthstone-Deck-Tracker\HDTTests\Hearthstone\Secrets\SecretEventHandlerTest.cs:줄 174
Result 메시지: Assert.AreEqual이(가) 실패했습니다. 예상 값: . 실제 값: . Freezing Trap

버그가 있는 부분 확인 @junsix @JunhyeonMoon @yuneg11

image
위의 로직은 상대 영웅을 공격할 때 비밀을 지우는 부분.

image
위의 code segment를 보면 하수인이 공격을 한 경우 무조건 빙결의 덫을 제거함.

하지만 https://hearthstone.gamepedia.com/Advanced_rulebook#Combat 에 있는 If you play Explosive Trap then Freezing Trap, your enemy's Novice Engineer attacking into it will trigger the Explosive Trap and be reduced to -1 Health. The Freezing Trap is a hindering Secret and thus aborts having no target it considers valid.[30] 을 보면 하수인이 폭발의 덫에 죽는 경우 빙결의 덫이 발생하지 않는 것을 알 수 있음.

버그 수정 코드 작성 @junsix

수정 내용

else if(CreationRegex.IsMatch(logLine))
{
var match = CreationRegex.Match(logLine);
var id = int.Parse(match.Groups["id"].Value);
var cardId = match.Groups["cardId"].Value;
var zone = GameTagHelper.ParseEnum<Zone>(match.Groups["zone"].Value);
if(!game.Entities.ContainsKey(id))
{
if(string.IsNullOrEmpty(cardId) && zone != Zone.SETASIDE)
{
var blockId = gameState.CurrentBlock?.Id;
if(blockId.HasValue && gameState.KnownCardIds.ContainsKey(blockId.Value))
{
cardId = gameState.KnownCardIds[blockId.Value].FirstOrDefault();
if(!string.IsNullOrEmpty(cardId))
{
Log.Info($"Found known cardId for entity {id}: {cardId}");
gameState.KnownCardIds[blockId.Value].Remove(cardId);
}
}
else if (blockId.HasValue)
{
foreach (KeyValuePair<int, IList<string>> knownCardId in gameState.KnownCardIds)
{
if (knownCardId.Value.Contains(gameState.CurrentBlock.CardId))
{
cardId = gameState.CurrentBlock.CardId;
if (!string.IsNullOrEmpty(cardId))
{
Log.Info($"Found known cardId for entity {id}: {cardId}");
gameState.KnownCardIds[knownCardId.Key].Remove(cardId);
}
}
}
}
}
game.Entities.Add(id, new Entity(id) {CardId = cardId});
}

  1. 향상된 엘레크에 의해 추가로 들어가는 카드 들의 경우 currentblock에서 id 값을 공백으로 받지만 cardid는 정상적으로 가지고 있었음.
  2. 해결 내용 : currentblock의 id 값을 key로 dictionary를 검색하던 로직을 해당 경우에서 value를 먼저 찾는 방식으로 변경.

비밀 확인 문제.

Bug report

폭발의 덫/ 빙결의 덫 순서로 비밀이 걸려 있을때 폭발이 덫이 빠지면서 하수인이 죽어서 빙결의 덫이 발동하지 않는 경우에 빙결의 덫도 목록에 지워 버림.

Expected Behavior

빙결의 덫이 발동하지 않는 경우 비밀 리스트에서 사라지면 안됨.

Actual Behavior

Steps to reproduce behavior

Log/Screenshots

_
_
_

외래어 표기 문제를 해결한다.

Bug report

관용적으로 한국 사람들이 사용하는 표기와 프로그램이 보여주는 표기가 다름.

Expected Behavior

트래커

Actual Behavior

트랙커

Steps to reproduce behavior

Log/Screenshots

default

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.