MCPcopy Create free account
hub / github.com/catabriga/graphwar / refreshFunction

Method refreshFunction

src/Graphwar/GameScreen.java:329–360  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

327 }
328
329 public void refreshFunction()
330 {
331 Player player = graphwar.getGameData().getCurrentTurnPlayer();
332
333 if(player.isLocalPlayer() && !(player instanceof ComputerPlayer))
334 {
335 final String function = player.getCurrentTurnSoldier().getFunction();
336
337 SwingUtilities.invokeLater(
338 new Runnable()
339 {
340 public void run()
341 {
342 funcField.setEnabled(true);
343 funcField.setText(function);
344 }
345 }
346 );
347 }
348 else
349 {
350 SwingUtilities.invokeLater(
351 new Runnable()
352 {
353 public void run()
354 {
355 funcField.setEnabled(false);
356 }
357 }
358 );
359 }
360 }
361
362 public boolean isShowMessageVisible()
363 {

Callers 2

startGameMessageMethod · 0.80
nextTurnMessageMethod · 0.80

Calls 5

isLocalPlayerMethod · 0.95
getCurrentTurnSoldierMethod · 0.95
getCurrentTurnPlayerMethod · 0.80
getGameDataMethod · 0.80
getFunctionMethod · 0.45

Tested by

no test coverage detected