Jarファイルの中にあるコンパイル済みのライブラリを参照してプログラムを書いているのですが
わけあってコンパイルされたライブラリを読む必要が生じました。
EclipseでJavaを使っているのですがクラスファイルを開くと自動でデコンパイルされた参照ライブラリを見ることができました。
質問1
コードが編集できないので整形できず非常に読みづらいです。
読みやすくしたいのですがどのようにすれば編集可能ですか?
質問2
do-while文がおかしい?
コードがおかしいように思えます。これはどういうことなのでしょうか。
do- while周りのコードが読めないです。
よろしくお願いします。
コードは以下です↓
Java
1/* */ package org.aiwolf.sample.player; 2/* */ 3/* */ import java.util.Iterator; 4/* */ import org.aiwolf.client.lib.Content; 5/* */ import org.aiwolf.client.lib.DivinationContentBuilder; 6/* */ import org.aiwolf.client.lib.EstimateContentBuilder; 7/* */ import org.aiwolf.client.lib.RequestContentBuilder;import org.aiwolf.common.data.Agent;import org.aiwolf.common.data.Judge;import org.aiwolf.common.data.Role;import org.aiwolf.common.data.Species; 8/* */ public class SampleVillager extends SampleBasePlayer { 9/* */ protected void chooseVoteCandidate() { 10/* 10 */ this.werewolves.clear(); 11/* 11 */ Iterator var2 = this.divinationList.iterator(); 12/* */ } j = (Judge)var2.next(); 13/* 13 */ } while(j.getResult() != Species.WEREWOLF); } while(j.getTarget() != this.me && !this.isKilled(j.getTarget())); 14/* 14 */ Agent candidate = j.getAgent(); 15/* 15 */ if (this.isAlive(candidate) && !this.werewolves.contains(candidate)) { while(true) { 16/* 16 */ this.werewolves.add(candidate); 17/* */ Judge j; 18/* */ do { 19/* */ do { 20/* */ if (!var2.hasNext()) { 21/* 21 */ if (this.werewolves.isEmpty()) { 22/* 22 */ if (!this.aliveOthers.contains(this.voteCandidate)) { 23/* 23 */ this.voteCandidate = (Agent)this.randomSelect(this.aliveOthers); 24/* */ 25/* */ } 26/* 26 */ } else if (!this.werewolves.contains(this.voteCandidate)) { 27/* 27 */ this.voteCandidate = (Agent)this.randomSelect(this.werewolves); 28/* */ 29/* 29 */ if (this.canTalk) { 30/* 30 */ this.talkQueue.offer(new Content(new EstimateContentBuilder(this.voteCandidate, Role.WEREWOLF))); 31/* 31 */ this.talkQueue.offer(new Content(new RequestContentBuilder((Agent)null, new Content(new DivinationContentBuilder(this.voteCandidate))))); 32/* */ } 33/* */ } 34/* */ 35/* 35 */ return; 36/* */ } 37/* */ } public String whisper() { } 38/* 38 */ throw new UnsupportedOperationException(); 39/* */ } 40/* */ 41/* */ public Agent attack() { 42/* 42 */ throw new UnsupportedOperationException(); 43/* */ } 44/* */ 45/* */ public Agent divine() { 46/* 46 */ throw new UnsupportedOperationException(); 47/* */ } 48/* */ 49/* */ public Agent guard() { 50/* 50 */ throw new UnsupportedOperationException(); 51/* */ } 52/* */ } 53
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。