Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

8
LINES

< > BotCompany Repo | #1021273 // ai_mapPenaltyWithIncompatibleWordsList

JavaX fragment (include)

static int ai_mapPenaltyWithIncompatibleWordsList(SS map, Set<S> incompatible, int extraPenalty) {
  int p = 0;
  for (S a, b : map) {
    ++p;
    if (containsOneOf(incompatible, a + "/" + b, b + "/" + a)) p += extraPenalty;
  }
  ret p;
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1021273
Snippet name: ai_mapPenaltyWithIncompatibleWordsList
Eternal ID of this version: #1021273/2
Text MD5: 27591eabdcfd897227a36b90778f2c70
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-02-06 14:01:06
Source code size: 247 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 223 / 244
Version history: 1 change(s)
Referenced in: [show references]